250
μ
PD17717, 17718, 17719
(5) Address coincidence detection method
In the SBI mode, the master transmits a slave address to select a specific slave device.
Coincidence of the addresses can be automatically detected by hardware. IRQSIO2 is set only when the slave
address transmitted by the master coincides with the address set to SIO2SVA when the wake-up function
specification bit (SIO2WUP) = 1.
If the SIO2SIC of the serial I/O2 interrupt timing specification register 0 is set, the wake-up function cannot
be used even if SIO2WUP is set (an interrupt request signal is generated when bus release is detected). To
use the wake-up function, clear SIO2SIC to 0.
Cautions 1. Slave selection/non-selection is detected by the coincidence of the slave address
received after bus release (SIO2RELD = 1).
For this coincidence detection, the coincidence detection interrupt (INTCSI0) of the
address to be generated with SIO2WUP = 1 is normally used. Thus, execute
selection/non-selection detection by slave address when SIO2WUP = 1.
2. When detecting selection/non-selection without the use of interrupt with SIO2WUP
= 0, do so by means of transmission/reception of the command preset by program
instead of using the address coincidence detection method.
(6) Error detection
In the SBI mode, the serial data bus SB0 (SB1) status being transmitted is fetched into the destination device,
that is, the presettable shift register 2 (SIO2SFR). Thus, transmit errors can be detected in the following way.
(a) Method of comparing SIO2SFR data before transmission to that after transmission
In this case, if two data differ from each other, a transmit error is judged to have occurred.
(b) Method of using the serial I/O2 slave address register (SIO2SVA)
Transmit data is set to both SIO2SFR and SIO2SVA and is transmitted. After termination of transmission,
SIO2COI flag (coincidence signal coming from the address comparator) of the serial I/O2 operating mode
register 0 is tested. If “1”, normal transmission is judged to have been carried out. If “0”, a transmit error
is judged to have occurred.
(7) Communication operation
In the SBI mode, the master device selects normally one slave device as communication target from among
two or more devices by outputting an “address” to the serial bus.
After the communication target device has been determined, commands and data are transmitted/received
and serial communication is realized between the master and slave devices.
Figures 16-32 to 16-35 show data communication timing charts.
Shift operation of the presettable shift register 2 (SIOSFR) is carried out at the falling edge of serial clock (SCK).
Transmit data is output with MSB set as the first bit from the SB0/P2D0 or SB1/P2D1 pin. Receive data input
to the SB0 (or SB1) pin at the rising edge of SCK is latched into the SIO2SFR.