NJU6635
g) Function Set
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Code 0 0 0 0 1 DL A ∗ M1 M0
∗=Don’t Care
Function set instruction which sets the interface data length, the addressing mode for the DD
RAM, 1-line or 2-line display, and Pin configuration mode, is executed when the code ”1” is written
into DB5 and the codes of (DL), (A), (M1) and (M0) are written into DB4 (DL), DB3 (A), DB1 (M1),
and DB0 (M0) as shown below (character font is fixed 5 x 8 dots).
Note) This function set instruction must be performed at the head of the program prior to all other instructions
(except Busy flag/Address read). This function set instruction can not be executed afterwards unless
the interface data length change.
DL
FUNCTION
1
Set the interface data length to 8 bits (DB7 to DB0)
0
Set the interface data length to 4 bits (DB7 to DB4)
A couple of data must be sent or received.
A
FUNCTION
0
Set the Addressing Mode 1 for the DD RAM
1
Set the Addressing Mode 2 for the DD RAM
M1
FUNCTION
0
Set the 32-Character 1-Line Display
1
Set the 16-Character 2-Line Display
M0
FUNCTION
0
Set the Pin configuration mode A for Common and Segment Driver (Refer to cord.)
1
Set the Pin configuration mode B for Common and Segment Driver (Refer to cord.)
h) Set CG RAM Address
RS R/W DB7 DB6 DB5 DB4
Code 0 0 0 1 ∗ A
← Higher order bit →
DB3 DB2 DB1 DB0
AAAA
← Lower order bit →
Set CG RAM address instruction is executed when the code “1” is written into DB6 and the
address is written into DB4 to DB0 as shown above.
The address data mentioned by binary code “AAAAA “ is written into the address counter (AC)
together with the CG RAM addressing condition. After this instruction, the data writing/reading is
performed into/from the CG RAM.
CG RAM
CG RAM address
: (00)H – (1F)H