Overview & Parts
Check Out the Pins
Headers and Wiring
Wiring the LCD
Since this is a parallel LCD, data will be sent to it over a parallel interface. That is, multiple bits at a time. These LCDs are designed for either a 8-bit or 4-bit interface. Since we'd like to save pins, lets go with the 4-bit interface! The data pins are name D4, D5, D6, and D7. Double-check your datasheet but almost all parallel LCDs have these pins numbered 4, 3, 2, and 1 respectively.1 (D7) | 2 (D6) |
---|---|
3 (D5) | 4 (D4) |
5 | 6 |
7 | 8 |
9 (ENABLE) | 10 (R/W) |
11 (RS) | 12 (CONTRAST) |
13 (GND/VSS) | 14 (+5V/VDD) |
There's a lot of wiring to be done but we're going to go thru it very slowly so it shouldn't be too bad.
Lets connect these to the arduino thusly: D4 -> Arduino pin #7, D5 -> Arduino pin #8, D6 -> Arduino pin #9, D7 -> Arduino pin #10. |
|
Since I wasnt sure of the wiring, I used the sockets on the protoshield. Once I test and verify they are correct, I'll solder them in! Next are the two power wires. Parallel LCDs run off of +5V so you can just solder the Vcc wire to 5V and the ground wire to GND. |
|
Next are the 2 control wires, ENABLE and RS which we connect to pins 12 and 11 respectively.
|
|
Theres another control line called R/W that you can use to control whether you're reading or writing to the LCD. Since we'll just be writing, that pin can be connected to ground, saving another arduino pin.
|
|
The last wire is the contrast control, we need to connect a potentiometer to this to make the display visible. I dont know the specifics of the input current but I used a 10K potentiometer and it worked great. One pin is connected to +5V, the pin on the other side is connected to ground and the middle pin is connected to the contrast line. |
|
Now place the LCD on top. Looks good! |
Using the LCD Shield
Arduino Sketch
Now we must upload some sketch to the Arduino to talk to the LCD. Luckily the LiquidCrystal library is already built in. So we just need to load one of the examples and modify it for the pins we used.If you've changed the pins, you'll want to make a handy table so you can update the sketch properly.
LCD pin name | RS | EN | DB4 | DB5 | DB6 | DB7 |
Arduino pin # | 11 | 12 | 7 | 8 | 9 | 10 |
Open up the File->Examples->LiquidCrystal->HelloWorld example sketch
Now we'll need to update the pins. Look for this line:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
LiquidCrystal lcd(11, 12, 7, 8, 9, 10);
To match the pin table we just made.
Now you can compile and upload the sketch, adjusting the contrast if necessary. (The image below is from a different fruity sketch but it will look similar).