
223
CHAPTER 13
SERIAL INTERFACE SIO0
User’s Manual U12790EJ2V0UD
(1) Serial I/O shift register 0 (SIO0)
This is an 8-bit register used to carry out parallel/serial conversion and serial transmission/reception (shift
operation) in synchronization with the serial clock.
SIO0 is set by an 8-bit memory manipulation instruction.
When bit 7 (CSIE0) of serial operating mode register 0 (CSIM0) is 1, writing data to SIO0 starts a serial
operation.
In transmission mode, data written to SIO0 is output to the serial output (SO0) or serial data bus (SB0/SB1).
In reception mode, data is read from the serial input (SI0) or SB0/SB1 to SIO0.
Note that if the bus is driven in the SBI mode, 2-wire serial I/O mode, or I2C bus mode, the bus pins must
serve for both input and output. Thus, in the case of a device for reception, write FFH to SIO0 in advance
(except when address reception is carried out by setting bit 5 (WUP) of CSIM0 to 1).
In the I2C bus mode, set bit 7 (BSYE) of serial bus interface control register 0 (SBIC0) to 1.
In the SBI mode, the busy state can be cleared by writing data to SIO0. In this case, bit 7 (BSYE) of serial
bus interface control register 0 (SBIC0) is not cleared to 0.
RESET input makes SIO0 undefined.
Caution
In the I2C bus mode, do not execute an instruction that writes to SIO0 while WUP (bit 5 of
serial operating mode register 0 (CSIM0)) = 1. Data can be received when the wakeup function
is being used (WUP = 1), even if such an instruction is not executed. For details of the wakeup
function, refer to 13.4.5 (1) (c) Wakeup function.
(2) Slave address register 0 (SVA0)
This is an 8-bit register to set the slave address value for connection of a slave device to the serial bus.
SVA0 is set by an 8-bit memory manipulation instruction. It is not used in the 3-wire serial I/O mode.
The master device outputs a slave address for selection of a particular slave device to the connected slave
devices. These two data (the slave address output from the master device and the SVA0 value) are compared
by an address comparator. If they match, that slave device has been selected. In this case, bit 6 (COI) of
serial operating mode register 0 (CSIM0) becomes 1.
The higher 7 bits of the slave address with the LSB masked can also be compared by setting the bit 4 (SVAM)
of interrupt timing specification register 0 (SINT0).
If no match is detected in address reception, bit 2 (RELD) of serial bus interface control register 0 (SBIC0)
is cleared to 0. By setting bit 5 (WUP) of CSIM0 to 1 in the SBI mode, the wakeup function can be used. In
this case, an interrupt request signal (INTCSI0) is generated when the slave address output by the master
matches the value of SVA0 (the interrupt request is also generated when a stop condition is detected). This
interrupt request indicates that the master has requested communication.
Further, when SVA0 transmits data as a master or slave device in the SBI or 2-wire serial I/O mode, errors
can be detected by using SVA0.
Reset input makes SVA0 undefined.