Jump to content

help changing LCD baud rate

Recommended Posts

I have been unable to change the baud rate  in my SERLCD_16_2_5V_M43   (Connected  to Arduino)
I followed instructions in Linksprite documentation...I used the following in Setup:
void setup() {  Serial.begin(9600);Serial.write(124);
Do I need to somehow exit the command mode ?  Could you point me to a code example for changing the baud rate ?

Share this post

Link to post
Share on other sites

You can refer to this code example: (change baud rate to 19200)



#define Baud_2400    0x0b
#define Baud_4800    0x0c
#define Baud_9600    0x0d
#define Baud_14400   0x0e
#define Baud_19200   0x0f
#define txPin 2
SoftwareSerial LCD = SoftwareSerial(0, txPin);
// since the LCD does not send data back to the Arduino, we should only define the txPin
const int LCDdelay=10;  // conservative, 2 actually works

void SetLcdBaud(int Baud)
  unsigned int serialbaud;
    case 0x0b : serialbaud = 2400;  break; 
    case 0x0c : serialbaud = 4800;  break; 
    case 0x0d : serialbaud = 9600;  break; 
    case 0x0e : serialbaud = 14400; break; 
    case 0x0f : serialbaud = 19200; break; 
// wbp: goto with row & column
void lcdPosition(int row, int col) {
  LCD.write(0xFE);   //command flag
  LCD.write((col + row*64 + 128));    //position 
void clearLCD(){
  LCD.write(0xFE);   //command flag
  LCD.write(0x01);   //clear command.
void backlightOn() {  //turns on the backlight
  LCD.write(0x7C);   //command flag for backlight stuff
  LCD.write(157);    //light level.
void backlightOff(){  //turns off the backlight
  LCD.write(0x7C);   //command flag for backlight stuff
  LCD.write(128);     //light level for off.
void serCommand(){   //a general function to call the command flag for issuing all other commands   
void setup()
  pinMode(txPin, OUTPUT);
  backlightOff() ;
  backlightOn() ;
  LCD.print("test baud rate 19200");
void loop()

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now