296
CHAPTER 15 SERIAL INTERFACE CHANNEL 0 (
μ
PD78018F SUBSERIES)
(6) Method of detecting address matching
In the SBIC mode, a specific slave device can be selected when the master transmits a slave address.
Whether the slave address output by the master coincides with the value of the slave address register (SVA)
of a slave is automatically detected by hardware. When the wake-up function specification bit (WUP) is 1 and
only if the slave address transmitted by the master coincides with the address set to the SVA, CSIIF0 is set.
If bit 5 (SIC) of the interrupt timing specification register is set to 1, the wake-up function does not operate
even if WUP is set to 1 (an interrupt request signal is generated on detection of bus release). Clear SIC to
0 to use the wake-up function.
Cautions 1. Whether a slave is selected or not is detected by matching of a slave address that has
been received after the bus release signal has been issued (RELD = 1).
To detect matching of addresses, an address match interrupt (INTCSI0) that is generated
when WUP = 1 is usually used. Therefore, check whether a slave device is selected or
not by reception of a slave address when WUP = 1.
2. To detect whether a slave is selected or not when WUP = 0 without using the interrupt,
do so by transmitting/receiving a command set by program in advance, instead of using
the address matching detection method.
(7) Error detection
In the SBI mode, the status of the serial bus SB0 (SB1) is also loaded to the serial I/O shift register 0 (SIO0)
of the device that is transmitting data; therefore, a transmit error can be detected by the following method:
(a) By comparing data of SIO0 before start and after completion of transmission
In this case, it is judged that an error has occurred if two data are different.
(b) By using slave address register (SVA)
The transmission data is set to SIO0 and SVA and transmission is executed. After completion of
transmission, the COI bit (match signal from address comparator) of the serial operation mode register
0 (CSIM0) is tested. If this bit is “1”, it is judged that transmission has been completed normally. If it is
“0”, it is judged that an error has occurred.
(8) Communication operation
In the SBI mode, the master usually selects one slave device for communication from two or more devices
by outputting an “address” to the serial bus.
After the target device for communication has been determined, commands and data are transmitted/received
between the master device and slave device, realizing serial communication.
Figures 15-26 through 15-29 show the timing chart of data communication.
The serial I/O shift register 0 (SIO0) performs shift operation in synchronization with the falling edge of the
serial clock (SCK0). The transmit data is latched to the SO0 latch, and is output from the SB0/P25 or SB1/
P26 pin, starting from the MSB. The receive data input to the SB0 (or SB1) pin at the rising edge of SCK0
is latched to the SIO0.