The LCD display in question is based on the very popular HD44780 controller. The Arduino platform has plenty of support for this controller and a library for its use is included with the Arduino IDE. The LCD will be driven in its 4-bit operation mode which requires the least pins. The 4-bit mode works by sending one nibble (4-bits) at a time to construct the entire byte. The display also has a character rom which simplifies use even further. If required custom characters can be programmed in but they are stored in volatile memory.
Using the Analogue Pins
Now that both the wireless module and LED driver IC are connected, digital pins available are running low. The LCD requires six ports on the microcontroller. Although many of the digital pins were taken the Arduino still had six free analogue ports. After a quick piece of research on the Arduino website it was discovered that the analogue pins can be addressed as digital pins by simply counting up six from pin 13, the last digital pin. This means pins 14 through 19 simply are digital representations of analogue pins 0 through 5. The display was connected and the library initialized to use the new pins, the LCD was working.
Wiring Diagram for Prototype:
|3||Contrast Voltage (10K Pot in our case)|
|4||R/S – Register Select (select between data or command register)|
|5||R/W – Read/Write (Select if reading or writing)|
|6||EN – Enable line|
|7-14||We are in 4-bit mode so we only use pins 11-14|
|15-16||Back-light power (In our case 5v LED BL)|