Hitachi 44780 Instruction set:
Instruction: Code: Description: Execution time (max)
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Clear Display 0 0 0 0 0 0 0 0 0 1 Clears entire display and sets DD RAM address 0 in address counter 1.64 ms
Return Home 0 0 0 0 0 0 0 0 1 - Sets DD RAM address 0 in address counter. Also returns display being shifted to original position. DD RAM contents remain unchanged 1.64 ms
Entry Mode Set 0 0 0 0 0 0 0 1 I / D S Sets cursor move direction and specifies shift of display. These operations are performed during data write and read. 40 μs
Display On / Off Control 0 0 0 0 0 0 1 D C B Sets entire display ON / OFF (D), Cursor ON / OFF (C), and blink of cursor position character (B) 40 μs
Cursor or Display Shift 0 0 0 0 0 1 S / C R / L - - Moves cursor & shifts display without changing DD RAM contents 40 μs
Function Set 0 0 0 0 1 DL N F - - Sets interface data length (DL), number of display lines (N) and character size (F) 40 μs
Set CG RAM Address 0 0 0 1 ACG Sets CG RAM address, CG RAM data is sent and received after this instruction 40 μs
Set DD RAM Address 0 0 1 ADD Sets DD RAM address, DD RAM data is sent and received after this instruction 40 μs
Read BUSY-flag and Address 0 1 BF AC Reads BUSY-flag (BF), indicating internal operation is being performed and reads address counter contents 0 s
Write Data to CG or DD RAM 1 0 Write Data Writes data into DD RAM or CG RAM 40 μs
Read Data from CG or DD RAM 1 1 Read Data Reads data from DD RAM or CG RAM 40 μs
I / D = 1 : Increment
I / D = 0 : Decrement
S = 1 : Accompanies display shift
S / C = 1 : Display shift
S / C = 0 : Cursor move
R / L = 1 : Shift to the right
R / L = 0 : Shift to the left
DL = 1 : 8 bits; 0 : 4 bits
N = 1 : 2 lines; 0 : 1 line
F = 1 : 5x10 dots; 0 : 5x7 dots
BF = 1 : Internally operating
BF = 0 : Can accept instruction
- = no effect
DD RAM: Display Data RAM
CG RAM: Character Generator RAM
ACG: CG RAM Address
ADD: DD RAM Address,
corresponds to cursor address
AC: Address counter used for
both DD and CG RAM
address
Execution time changes when frequency changes