Sending Commands Via the LCD Backpack
Working with LCD screens has never been easier. With the LCD backpack soldered to the back of a 16x2 or 20x4 liquid crystal display (LCD), you can program the screen to do many things, including display alpha number characters, blink cursor, clear the screen, scroll effect, and much more!
In this tutorial, we will show you how to send a few commands using an FTDI Serial to USB converter and your computer. This way we can keep programming out of it, and keep the tutorial simple. You can, however, easily use the backpack with any microcontroller of your choice. Once you understand the basic commands, you will be on your way to LCD bliss.
This tutorial makes use of the following hardware:
Download any Serial Communication Software of your choice (Putty, Hyper Terminal, etc). We will use X-CTU whichhas a great, built-in Assemble Packet command. You can download it freehere.
Step 1: Solder
Solder the backpack to the back of your LCD.
Step 2: Connect to the FTDI
Give power, ground, and receiving (rx pin to the tx on the FTDI), to the backpack. The backpack is labeled. The male-to-male jumper wires will connect directly to the FTDI PCB.
Step 3: Give the board power
Go ahead and connect the micro USB cable to the FTDI and the computer.
Step 4: Open the software
Open the software, click on the correct com port (not sure, visit device manager to make sure everything is working properly), update the baudrate to 9600, then click on the terminal tab.
Step 5: Input message
Once inside the terminal area, you can begin typing your text. You will notice the text automatically displays on the LCD screen.
Step 6: Command Execution
To execute commands like, "clear the screen", "change the cursor location", and "turning the display on/off"; Refer to the user manual: http://www.jayconsystems.com/lcd-serial-back-pack.html
An example of one of the commands might be "clearing the screen". To clear the screen, you will need to assemble a packet.
When the new window opens, you will want to select HEX.
Step 7: Assemble and Send the packet
You now have the assemble packet window open, and have selected the Hex radio button. Now it's time to send your command. You will begin with and "FE", followed by the code you want to execute. For example "FE 01" followed by send.
Immediately, you will notice the command was executed. You can use this Assemble Packet window for any of the commands found in the User Manual.If you have any questions about this tutorial, don't hesitate to post a comment, shoot us an email, or post it in our forum!