|
Connecting a LCD to TINI |
|
|||||||
|
The schematic on Dallas' site gives details of the connections on J17, but for convenience they're listed below: | |||
| |||
|
Testing The RS data sheet details the commands for controlling the LCD, and the LCDPort.sendControl() method can be used to send them to the module. The address, which sets the position in the the character memory to write data, can similarly be set using the LCDPort.setAddress() method. To send text to the display, give the character to LCDPort.sendData() as a parameter. The character memory is set out into two rows of forty characters, with the display showing a two row, eight character window onto the contents of the character memory.
For quick reference, I've put the hex values for the common commands here - my mental areithmetic is particularly useless. Note that this information is for the LCD listed above, others may be different.
To test the construction, I wrote a couple of simple classes. LCDTest simply sends commands or data to the LCD from the command line and is useful for figuring out what's going on. The other, LCDClock, turns TINI into a digital clock, daft, but cool. You may now drink your weak lemon drink...
| |||