176
ยตPD750008 USER'S MANUAL
When the slave receives a transmission data count, if it has data enough for transmitting the
specified number of bytes of data, the slave returns ACK. If the slave does not have enough
data for transmission, an error occurs; ACK is not returned in this case.
The master sends ACK to the slave each time it receives one byte.
<2> WRITE command, END command, STOP command
These commands write data to a slave. One to 256 bytes of data can be written. The data
length is specified in a parameter by the master. When 00H is specified as the data length,
the 256-byte data transfer is assumed.
Figure 5-73. Transfer Format of the WRITE and END Commands
Remark M: Output by the master
S: Output by the slave
If the slave has an enough area for storing receive data of the specified length, the slave
returns ACK. If the slave does not have an enough area, an error occurs; ACK is not returned
in this case.
The master transmits an END command when all data have been transferred. The END
command informs the slave that all data have been transferred correctly.
The slave accepts an END command even before data reception is uncompleted. In this case,
the data received just before the acceptance of the END command becomes valid.
The master compares the contents of SIO before transfer with the contents of SIO after
transfer to check whether the data has been output onto the bus correctly. If the contents
of SIO disagree with each other, the master interrupts data transfer by transmitting a STOP
command.
Figure 5-74. Transfer Format of the STOP Command
Remark M: Output by the master
S: Output by the slave
When the slave receives a STOP command, the slave invalidates the most recently received one byte.
WRITE
M
ACK
S
Data count
M
Data
ACK
S
Data 0
M
Data
ACK
S
Data N
M
Data
ACK
S
END
M
Command
ACK
S
Command
Data
M
ACK
S
Data
STOP
M
ACK
S
Command
Data check error occurs. Data transfer interruption