Connecting LCD to arduino

Hey Guy´s

Trying to find out example code and library for the display i bought, but there are so many differnt types online = confused.............*2_CHARACTERS_LCD, this one has a piggybacked card on the back with serial input RX, TX, GND, 5V

As i understand it this uses only 2 pins on the arduino??

Please help me, initialize, and print "hello"

Thank you all

/ Andy

What does the backpack look like? Does it have a Silabs C8051F330 microcontroller on it?

Whereas most backpack LCDs have clear syntax, this seems to be particularly fraught.

I would guess that you can just say:

SoftwareSerial lcd(2, 3);     //connect RX, TX pins

setup() {
    lcd.begin(9600);     //probably works at 9600 baud
loop {
    int column = 2;
    lcd.print("sc;");           //reset and clear screen
    lcd.print("d0," + String(column) + ";");    //set cursor to 2, 0
    lcd.print("ss" + "hello world" + ";");
    lcd.print("d1," + String(3) + ";");         //set cursor to 3, 1   
    lcd.print("ss" + "second line" + ";");

Untested. It looks an appalling way to do things.
I am sure that you can make a special library class that accepts regular lcd method()s and kludges the necessary contortions for the actual string that gets sent on the SoftwareSerial.

It looks as if you would not be able to print a regular semi-colon because it works as a terminator.

Why did you buy this display?
The I2C backpack LCDs are widely available, cheap and reliable.


Hi David and thanks... i cannot see, the back is soldered on, it does say Serial LCD 1.1 by

Had no plan to why i bought this particular LCD other then it doesent have any pins for Arduino, the shop didint have arduinos unsolderad and im using it for panel mounting..

Best regards

/ Andy

Pure guesswork on my behalf.

Did you try the Untested sketch that I outlined? Possibly with trying different baud rates.

If it works, it should be straightforward to create a suitable class.

You should be able to have some guess about an onboard mcu. Even if the SMD components are on the underside of the backpack. i.e. is it TQFP ?


You should be able to have some guess about an onboard mcu.

For what it's worth the wiki that he refers to in his OP has a link to firmware that in turn indicates that the mcu is an 8051 derivative.

Also: it does work at 9600 baud as shown in the sketchy specifications.

NOTE: I can't seem to make these 'ftp' links work with the forum software so you will have to go to the wiki page (that link works) and scroll all the way to the bottom to find the actual links.


Hello guy´s i found another reference to this in a thread by Don and AAinlithium wich struggled with the same problem, aparently also TX->connects to TX, not Rx/Tx as normal for some reason…

Code below works fine with these displays…

Thank you all for all the help :slight_smile:

Sincerely Your´s

/ Andy

From other thread…

Yeah now I know whats wrong with my sketch & connection. The solution is:
1- If use SoftwareSerial, DO NOT use pin 0 & pin 1…
Those are h/w serial pins connected to Serial Monitor. Use another pins.
2- Connecting Ardunio Tx to LCD’s Tx. It is WORKS !

below is my basic sketch. LCD will print “Hello world” at topline, “Bye World!” at bottomline, & looping continuously.

#include <SoftwareSerial.h>
#define txLCDPin 8

const byte txLcdPin = 8; // will connect to LCD’s Tx
const byte rxLcdPin = 7; // not connected to anywhere

SoftwareSerial myLcdSerial = SoftwareSerial(rxLcdPin, txLcdPin);
void setup()
pinMode(txLcdPin, OUTPUT); // Arduino’s Tx as transmitter to LCD
pinMode(rxLcdPin, INPUT); //
myLcdSerial.print(“sc;”); //command IteadStudio for ‘screen clear’


void loop()
myLcdSerial.print(“sb1;”); // set backlight, 0=off, 1=on (sb)
myLcdSerial.print(“sd0,2;”); //set coordinate (col 0,row 2)
myLcdSerial.print(“ssHello World!;”); // Command IteadStudio for ‘send string’

myLcdSerial.print(“sd1,0;”); // set coordinate (col 1,row 0)
myLcdSerial.print(“ssBye World!;”); // Command IteadStudio for ‘send string’

My rough sketch was not far wrong!

I am sure that someone has already written a class for this. I suggest you do a bit of Googling.

If you don't find anything, we will have to write it ourselves. At the end of the day, it must be wise to use the "standard lcd" method()s.


OK, willhelmx, if you are going to discuss stuff here, please go and read the instructions, then go back and modify your post (use the "More --> Modify" option to the bottom right of the post) to mark up the code as such so we can examine it conveniently and accurately.

If you do not do this, the code you post could well be garbled and is certainly anything but easy to read.

Note: Also mark up any data in the same way. This includes error output that you get from the IDE.

And - before you post code, use "Auto Format" in the Tools menu to properly present the code.