
ST7038
Ver 1.1
17/61
2007/01/25
l
I
2
C Interface protocol
ST7038 receives command/data issued by MPU with correct slave address. Before any data is transmitted on the I
2
C
Interface, the device, which should respond, is addressed first. Four kinds of 7-bit slave address (01111
00
to 01111
11
)
are reserved for ST7038. The R/W bit is assigned to 0 for write only. The I
2
C Interface protocol is illustrated in Figure 7.
The sequence is initiated with a START condition (S) from the I
2
C Interface master, which is followed by the slave
address. All slaves with the corresponding address acknowledge in parallel, all the others will ignore the I
2
C Interface
transfer. After acknowledgement, one or more command words follow which define the status of the addressed slaves.
A command word consists of a control byte, which defines Co and A0, plus a data byte. The last control byte is tagged
with a cleared most significant bit (i.e. the continuation bit Co). After a control byte with a cleared Co bit, only data bytes
will follow. The state of the A0 bit defines whether the data byte is interpreted as a command or as RAM data. All
addressed slaves on the bus also acknowledge the control and data bytes. After the last control byte, depending on the
A0 bit setting; either a series of display data bytes or command data bytes may follow. If the A0 bit is set to logic 1,
these display bytes are stored in the display RAM at the address specified by the data pointer. The data pointer is
automatically updated and the data is directed to the intended ST7038i device. If the A0 bit of the last control byte is set
to logic 0, these command bytes will be decoded and the setting of the device will be changed according to the
received commands. Only the addressed slave makes the acknowledgement after each byte. At the end of the
transmission the I
2
C INTERFACE-bus master issues a STOP condition (P).
Figure 7
I
2
C Interface Protocol
0
Last control byte to be sent. Only a stream of data bytes is allowed to follow.
This stream may only be terminated by a STOP condition.
Co
1
Another control byte will follow the data byte unless a STOP condition is received.
l
Data Register and Instruction Register
During write operation, two 8-bit registers are used. One is data register (DR), the other is instruction register (IR).
The data register (DR) is used as temporary data storage place for being written into internal RAM blocks (DDRAM,
CGRAM and ICON RAM). The RAM block is selected by RAM address setting instruction. Each internal operation,
writing into RAM, is done automatically. That means: after MPU writes data into DR, the data in DR is transferred into
DDRAM/CGRAM/ICON RAM automatically.
The instruction register (IR) is used only to store instruction code transferred from MPU. MPU cannot read instruction
data back via this register (IR).
Use the A0 bit in control byte to select the correct register (DR or IR):
Table 4
Operations according to A0 and R/W bits.
A0
R/W
Operation
L
L
Instruction Write operation (MPU writes Instruction code into IR)
H
L
Data Write operation (MPU writes data into DR)