242
CHAPTER 8 APPLICATIONS OF SERIAL INTERFACE
8.1.1 Communication in 2-wire serial I/O mode
The 3-wire mode of the
μ
PD6252
Note
is implemented by serial clock (SCL), data (SDA), and chip select (CS) lines.
Excluding the handshaking line, therefore, only two lines, clock and data lines, are necessary for interfacing. To
interface the
μ
PD6252 with a 78K/0 series microcontroller, the 2-wire serial I/O mode is used. In the example shown
in this section, the
μ
PD78054 subseries is used.
Note
μ
PD6252 is for maintenance use.
Figure 8-26. Example of Connection of
μ
PD6252
Table 8-8 and Figure 8-27 shows the commands to write and read data to/from the
μ
PD6252 and communication
format.
Table 8-8.
μ
PD6252 Commands
Command Name
Command
Operation
RANDOM WRITE
00000000B [00H]
MSB
Transfers write data after setting an 8-bit word address (WA). Up to 3 bytes of write
data can be set successively.
C
7
-C
0
Correspondence between word address and data
WA
Data of first byte
WA+1
Data of second byte
WA+2
Data of third byte
The write operation is executed in the internal write cycle after the CS pin has gone
low.
CURRENT READ
10000000B [80H]
MSB
C
7
-C
0
Transfers the contents of memory specified by the word address (WA) (current
address) specified when the command is set, to the read data buffer. Each time 8
bits of data have been read from the SDA pin, the word address (WA) is incremented,
and the corresponding memory contents are transferred to the data buffer.
RANDOM READ
11000000B [C0H]
MSB
C
7
-C
0
Executes data read starting from a set word address (WA) after the word address has
been set.
The difference from CURRENT READ is that this command sets a word address (WA)
after it has been executed.
After the word address has been set, this command performs the same operation as
CURRENT READ.
PD78054
μ
SCK0
SCL
PD6252
μ
SB1
SDA
P32
CS
CE
V
DD
V
DD