SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.
Thank you for purchasing our serial-enabled LCD! This LCD will allow your project to display all kinds of text and numbers. LCDs can be difficult to use, so we've added an embedded processor to this LCD that does the hard work for you. This LCD is easy to connect to any 5V microprocessor that has a serial port, such as an Arduino, AVR, PIC, etc.
There are only three connections you need to make to the LCD:
|signal name||signal spec||wire color (JST cable)|
|RX (receive)||Serial receive (input to the display). 5V TTL level, 9600 baud (default rate, can be changed), 8 bits, 1 stop, no parity.||Yellow|
|GND (ground)||Ground for the power supply.||Black|
|VDD (power)||Power supply, this should be +5V at up to 60mA if the backlight is fully on.||Red|
The board has two headers with the above three signals. They are electrically identical, so you can use either one. One header is bare, the other has a 3-pin JST connector preattached to it that matches a JST cable. The cable only connects one way; press it in until it clicks. JST connectors are designed to be very snug; don't pull on the wires to disconnect it, see our tutorial on the proper way to disconnect JST cables.
(Tip: if you want to connect the display to a breadboard, tin the ends of the wires to make them easier to insert into the breadboard holes. To tin wire, strip about 1/4", and put some solder on the bare wire to make it stiffer).
Note that the RX input should be a 5V TTL-level signal directly from a 5V microcontroller or other 5V system. You should NOT connect the board to RS232-level voltages, which are +/-10V and will damage the board (see our explanation here). If you do wish to connect this display to RS232 signals, you can use a level-shifting board such as our PRT-00449 to translate the RS232 signals to TTL-level signals.
When you power up the board, you'll briefly see a SparkFun splash screen, and then the display will go blank. To send text to the board, wait 1/2 second (500ms) after powerup for the splash screen to clear, then send text to the display through your serial port. The display understands all of the standard ASCII characters (upper and lowercase text, numbers, and punctuation), plus a number of graphic symbols and Japanese characters. See the HD44780 datasheet for the full list of supported characters.
If you send data that goes past the end of the first line, it will skip to the start of the second line. If you go past the end of the second line, the display will jump back up to the beginning of the first line. (Tip: you can simulate a scrolling window in software by copying the second line to the first line, and clearing the second line.)
Note that the Arduino and other systems with bootloaders may send "garbage" characters to the display while the system is starting up or being reprogrammed. To avoid this, you can use a software serial library to create a separate serial port from the USB port, as in the following examples.
NOTE that these examples were written for Arduino 1.0 and later. If you are using an older version of Arduino, you can download the older examples here: serial_lcd_quickstart_Arduino02.zip.
You can copy and paste these sketches into your Arduino 1.0 (or later) editing window, or download them here: serial_lcd_quickstart_Arduino10.zip.
A common LCD technique is to repeatedly display changing numbers such as RPM or temperature in the same place on the display. You can easily do this by moving the cursor before sending your data.
To move the cursor, send the special character 254 decimal (0xFE hex), followed by the cursor position you'd like to set. Each cursor position is represented by a number, see the table below to determine the number to send:
For example, if you want to move to the beginning of the second line, send the bytes 254 192 (decimal).
Here's a slightly more complex example showing how to display data at fixed points on the display, plus the use of sprintf to convert numbers to strings (this right-justifies the numbers with leading spaces, which keeps them from "jumping around" if the number of digits changes):
Other commands are available to change the backlight level, turn the splash screen on and off (and customize it to your own text), change the baud rate, etc. See the LCD datasheet for information on all the available commands.
For a more extensive example sketch that shows oyu how to create a scrolling marquee, create a timer, display sensor data and control the backlight, downlaod the following examples:
If the display is powered up without the RX line connected to anything, the display may fill with strange characters. This is because the display is receiving random noise on the disconnected line. If you connect the RX line to a true TX port, this will not happen.
If the display is unreadable or washed out, the contrast may need to be adjusted. Send some text to the display (see the first example sketch above), then use a miniature Phillips screwdriver to gently turn the contrast trimpot labeled VR1 on the back of the display until the text is as clear as possible (please be gentle with the trimpot). This display also has a backlight that can be adjusted for best readability, see the LCD datasheet for information.
This display has a feature where if the display receives a CTRL-R character during its half-second splash screen display, it will temporarily revert to 9600 baud until power is cycled. This is to allow you to regain control of the display if you set it to an unknown baud rate. Some systems like Arduino send bootloader information out the serial port when the system starts up, which can fool the LCD into this recovery mode. If this is a problem, there are a few solutions: you can use a different pin and the NewSoftSerial library to create a TX port that doesn't get used during startup (as shown in the example sketches above), or leave the display at the default 9600 baud rate, and clear the display when your program starts.
Enjoy your new display! If you have any problems, feel free to contact SparkFun Technical Support at firstname.lastname@example.org.