1
4
P
P
L
P
Table 9
Example of I
2
C-bus operation; 1-line display (using internal reset, assuming SA0 = V
SS
; note 1)
STEP
I
2
C-BUS BYTE
DISPLAY
OPERATION
1
2
I
2
C-bus start
Slave address for write:
SA6 = 0; SA5 = 1; SA4 = 1; SA3 = 1; SA2 = 0; SA1 = 1;
SA0 = 0; R/W = 0; Ack = 1
Send a control byte for function set:
Co = 0; RS = 0; R/W = 0; Ack = 1
Function set:
DB7 = 0; DB6 = 0; DB5 = 1; DB4 = X; DB3 = 0; DB2 = 0;
DB1 = 0; DB0 = 0; Ack = 1
Display on/off control:
DB7 = 0; DB6 = 0; DB5 = 0; DB4 = 0; DB3 = 1; DB2 = 1;
DB1 = 1; DB0 = 0; Ack = 1
Entry mode set:
DB7 = 0; DB6 = 0; DB5 = 0; DB4 = 0; DB3 = 0; DB2 = 1;
DB1 = 1; DB0 = 0; Ack = 1
I
2
C-bus start
Initialized. No display appears.
During the acknowledge cycle SDA will be pulled-down by
the PCF2104x.
3
Control byte sets RS and R/W for following data bytes.
4
Selects 1-line display; SCL pulse during acknowledge
cycle starts execution of instruction.
5
_
Turns on display and cursor. Entire display shows
character Hex 20 (blank in ASCII-like character sets).
6
_
Sets mode to increment the address by 1 and to shift the
cursor to the right at the time of write to the DDRAM or
CGRAM. Display is not shifted.
For writing data to DDRAM, RS must be set to 1.
Therefore a control byte is needed.
7
_
8
Slave address for write:
SA6 = 0; SA5 = 1; SA4 = 1; SA3 = 1; SA2 = 0; SA1 = 1;
SA0 = 0; R/W = 0; Ack = 1
Send a control byte for write data:
Co = 0; RS = 1; R/W = 0; Ack = 1
Write data to DDRAM:
DB7 = 0; DB6 = 1; DB5 = 0; DB4 = 1; DB3 = 0; DB2 = 0;
DB1 = 0; DB0 = 0; Ack = 1
Write data to DDRAM:
DB7 = 0; DB6 = 1; DB5 = 0; DB4 = 0; DB3 = 1; DB2 = 0;
DB1 = 0; DB0 = 0; Ack = 1
_
9
_
10
P_
Writes ‘P’. The DDRAM has been selected at power-up.
The cursor is incremented by 1 and shifted to the right.
11
PH_
Writes ‘H’.
12 to 15
|
|
|
|
16
Write data to DDRAM:
DB7 = 0; DB6 = 1; DB5 = 0; DB4 = 1; DB3 = 0; DB2 = 0;
DB1 = 1; DB0 = 1; Ack = 1
PHILIPS_
Writes ‘S’.