Code to control LCD that uses a supporting UART based interface boards such as:
Gravitech SLCD-3 Serial Character LCD Driver Board Kit (NON-USB) (tested and verified)
Modern Device LCD117 http://shop.moderndevice.com/products/20x4lcd-lcd117kit
Wulfden K107 http://www.wulfden.org/TheShoppe/k107/index.shtml
Apparently the code on the boards came from Peter Anderson and I found the last two boards have same interface commands as the Gravitech one.
I tried to make the code as similar to existing LCD controlling libraries of Arduino as possible, like LiquidCrystal library.
The reason to use these boards is because all you need is one digital pin for communicating between your Arduino with the LCD display.
The boards are expecting UART at 9600 baud rate and I use SoftwareSerial on standard digital I/O pins of the Arduino for doing that. At least the Gravitech board has also a reset pin which I found useful. Although not specified in the datasheet, I found the reset to work on rising edge from zero.
Wiring:
- Connect the Tx from the Software Serial to the serial-LCD controller board
- Connect the Reset pin of the serial-LCD controller to the specified pin in the call to begin function
- The Rx pin from the software serial interface is not used!
- Obviously connect the power (5V) and GND to the board.
SerialLCD.zip (5.7 KB)