
FEDL9042-01
OKI Semiconductor
ML9042-xx
48/58
Initial Setting of Instructions
(a)
Data transfer from and to the CPU using 8 bits of DB0 to DB7
1)
Turn on the power.
2)
Wait for 15 ms or more after VDD has reached 2.7 V or higher.
3)
Set “8 bits” with the Function Setting instruction.
4)
Wait for 4.1 ms or more.
5)
Set “8 bits” with the Function Setting instruction.
6)
Wait for 100
s or more.
7)
Set “8 bits” with the Function Setting instruction.
8)
Check the Busy Flag for No Busy (or wait for 100
s or more).
9)
Set “8 bits”, “Number of LCD lines” and “Font size” with the Function Setting instruction.
(After this, the number of LCD lines and the font size cannot be changed.)
10) Check the Busy Flag for No Busy.
11) Execute the Display ON/OFF control Instruction, Display Clear Instruction, Entry Mode Setting
instruction and Arbitrator Display Line Setting Instruction.
12) Check the Busy Flag for No Busy.
13) Initialization is completed.
An example of instruction code for 3), 5) and 7)
RS1
1
RS0
0
R/W
0
DB7
0
DB6
0
DB5
1
DB4
1
DB3
×
DB2
×
DB1
×
DB0
×
×: Don’t Care
(b)
Data transfer from and to the CPU using 4 bits of DB4 to DB7
1)
Turn on the power.
2)
Wait for 15 ms or more after VDD has reached 2.7 V or higher.
3)
Set “8 bits” with the Function Setting instruction.
4)
Wait for 4.1 ms or more.
5)
Set “8 bits” with the Function Setting instruction.
6)
Wait for 100
s or more.
7)
Set “8 bits” with the Function Setting instruction.
8)
Check the Busy Flag for No Busy (or wait for 100
s or longer).
9)
Set “4 bits” with the Function Setting instruction.
10) Wait for 100
s or longer.
11) Set “4 bits”, “Number of LCD lines” and “Font size” with the Function Setting instruction. (After this,
the number of LCD lines and the font size cannot be changed.)
12) Check the Busy Flag for No Busy.
13) Execute the Display ON/OFF control Instruction, Display Clear Instruction, Entry Mode Setting
instruction and Arbitrator Display Line Setting Instruction.
14) Check the Busy Flag for No Busy.
15) Initialization is completed.
An example of instruction code for 3), 5) and 7)
RS1
1
RS0
0
R/W
0
DB7
0
DB6
0
DB5
1
DB4
1