
This is the set of commands for all LCD panels which are driven with the HITACHI
HD44780 controller, just check your panel for the chip.
The LCD panels can driven by 4 or 8 bits. There is also 3 control lines - EN (Enable), D/I
(Data/Instruction) and R/W (Read/Write).
To connect with a minimum of wires you need 4+3 I/O lines in 4 bit mode.
Sequence for signals is as follows
1st 2nd
____ ____
EN ____| |______| |_____
____ ____
Data ___|____|______|____|______
(4bit mode) d4-d7 d3-d0
Exec. DI RW b7 b6 b5 b4 b3 b2 b1 b0 1,52ms 0 0 0 0 0 0 0 0 0 1 Reset LCD Panel, Erase RAM 1,52ms 0 0 0 0 0 0 0 0 1 - Cursor + AC=0, Display in origin position 37us 0 0 0 0 0 0 0 1 I/D S Define cursor movment and shift display 37us 0 0 0 0 0 0 1 D C S Display ON/OFF(D), cursor(C) and blonk at cursor position(B) 37us 0 0 0 0 0 1 S/L R/L- - Move the cursor and shift display 37us 0 0 0 0 1 DL N F - - Define bus length (DL), number of line, matrix font used (5x8 or 5x10) 37us 0 0 0 1 CG RAM Address Define CG RAM Address 37us 0 0 1 DD RAM Address Define DD RAM Address 0us 0 1 BF Address counter AC Read busy Flag & AC 37us 1 0 Write DATA Write DATA into DD or CG RAM 37us 1 1 Read DATA Read DATA from DD or CG RAM
mwr 0000and then start counting up. The code demostrates a lookup table for the text, the handshaking routine for writing to the display and indirect addressing to display the digits. To connect up the display, refer to the declarations in the header.
