You are on page 1of 2

Connector Pinout http://lcd.sourceforge.

net/ 1 2 3 4 5 6 7 8 9 10 Front Panel button (pulls to ground) Backlight control N/C LCD Display Bias Register Select (RS) Read/Write Select (R/W) Chip Enable Controller 1 (EN1) Chip Enable Controller 2 (EN2) N/C N/C 11 12 13 14 15 16 17 18 19 20 N/C Ground D0 D1 D2 D3 D4 D5 D6 D7

Protocol details
All characters other than those below are written to the data register of the current display controller. Where the following values are to be written to the data register, the 0xFF escape described below should be used. Character Action ^G (0x7) Next character determines the level of the external output '0' for 0V, '1' for 5V Next character determines if the cursor wraps within the displays geometry ('0' for ^I (0x9) no, '1' for yes) This applies within each controller only - the display will always wrap between controllers if more than one is present ^J (0xA) Line feed - cursor moves to same position in next line Set display Geometry - takes 4 characters as data. - First character specifies the number of controllers ('1' or '2') - Second character specifies the number of lines per controller ('1' or '2') - Next two character specify the number of display columns in hex ^K (0xB) eg. ^K1210 specifies a 16x2 display with 1 controller

Once the geometry has been received the controller(s) are re-initialised and the display cleared. This takes about 1 second. If the second controller cannot be found then the same geometry is used, but the number of controllers is assumed to be 1. ^L (0xC) Form feed - clear display ^M (0xC) Carriage return - return to the start of the current line ^N (0xC) Report display geometry - outputs a string to the serial port 'G' <a> <b> <nn> where

a, b and nn are the parameters as specified in ^K above. Position cursor - takes a single character to specify the cursor position ESC (0x1b)
; ; ; ; ; ; ; ; bit 7 6 5 4 3 2 1 0 +---+---+---+---+---+---+---+----+ | D | L | character offset | +---+---+---+---+---+---+---+----+ b7 - selects display b6 - selects display line b5-b0 - selects character offset into current line

0xFE 0xFF

Control register passthrough. Takes next two characters as arguments. The first '1' or '2' specifies the controller to write the next character to. The character is written into the control register. This can be used for switching the visible cursor on/off etc. Data pass through - as per 0xFE except the data register is written to. Can be used for programming and displaying used specific fonts (see HD74480 data sheet)