HD44780U
24
Normally, instructions that perform data transfer with internal RAM are used the most. However, auto-
incrementation by 1 (or auto-decrementation by 1) of internal HD44780U RAM addresses after each data
write can lighten the program load of the MPU. Since the display shift instruction (Table 11) can perform
concurrently with display data write, the user can minimize system development time with maximum
programming efficiency.
When an instruction is being executed for internal operation, no instruction other than the busy flag/address
read instruction can be executed.
Because the busy flag is set to 1 while an instruction is being executed, check it to make sure it is 0 before
sending another instruction from the MPU.
Note:
Be sure the HD44780U is not in the busy state (BF = 0) before sending an instruction from the
MPU to the HD44780U. If an instruction is sent without checking the busy flag, the time between
the first instruction and next instruction will take much longer than the instruction time itself. Refer
to Table 6 for the list of each instruc-tion execution time.
Table 6
Instructions
Code
Execution Time
(max) (when f
cp
or
f
OSC
is 270 kHz)
Instruction RS
Clear
display
R/
W
DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Description
0
0
0
0
0
0
0
0
0
1
Clears entire display and
sets DDRAM address 0 in
address counter.
Sets DDRAM address 0 in
address counter. Also
returns display from being
shifted to original position.
DDRAM contents remain
unchanged.
Sets cursor move direction
and specifies display shift.
These operations are
performed during data write
and read.
Sets entire display (D) on/off,
cursor on/off (C), and
blinking of cursor position
character (B).
Moves cursor and shifts
display without changing
DDRAM contents.
Sets interface data length
(DL), number of display lines
(N), and character font (F).
Return
home
0
0
0
0
0
0
0
0
1
—
1.52 ms
Entry
mode set
0
0
0
0
0
0
0
1
I/D
S
37
μ
s
Display
on/off
control
0
0
0
0
0
0
1
D
C
B
37
μ
s
Cursor or
display
shift
Function
set
0
0
0
0
0
1
S/C
R/L
—
—
37
μ
s
0
0
0
0
1
DL
N
F
—
—
37
μ
s
Set
CGRAM
address
Set
DDRAM
address
Read busy
flag &
address
0
0
0
1
ACG ACG ACG ACG ACG ACG Sets CGRAM address.
CGRAM data is sent and
received after this setting.
37
μ
s
0
0
1
ADD ADD ADD ADD ADD ADD ADD Sets DDRAM address.
DDRAM data is sent and
received after this setting.
Reads busy flag (BF)
indicating internal operation
is being performed and
reads address counter
contents.
37
μ
s
0
1
BF
AC
AC
AC
AC
AC
AC
AC
0
μ
s