313
CHAPTER 16 SERIAL INTERFACE CHANNEL 0 (
μ
PD78018FY SUBSERIES)
(1) Serial I/O shift register 0 (SIO0)
This 8-bit register converts parallel data into serial data, and transmits/receives serial data (shift operation)
in synchronization with the serial clock.
SIO0 is set by an 8-bit memory manipulation instruction.
When the bit 7 (CSIE0) of the serial operation mode register 0 (CSIM0) is 1, the serial operation is started
when data is written to SIO0.
The data written to SIO0 is output to the serial output line (SO0) or serial data bus (SB0/SB1) for transmission.
When data is received, it is read from the serial input line (SI0) or SB0/SB1 to SIO0.
In the 2-wire serial I/O mode and I
2
C bus mode bus configuration, the input and output pins are shared. The
device that is to receive data therefore must be made the N-ch open-drain output for transmission high-
impedance state in advance. Therefore, write FFH to SIO0 in the 2-wire serial I/O mode. In the I
2
C bus mode,
set bit 7 (BSYE) of the serial bus interface control register (SBIC) to 1, and write FFH to SIO0.
SIO0 becomes undefined at RESET.
Caution
Do not execute an instruction that writes SIO0 in the I
2
C bus mode while WUP (bit 5 of serial
operation mode register 0 (CSIM0)) is 1 Even if such an instruction is not executed, data
can be received while the wake-up function is being used (WUP = 1). For the details of the
wake-up function, refer to 16.4.4 (1) (c) Wake-up function.
(2) Slave address register (SVA)
This 8-bit register sets the value of a slave address when the microcomputer is connected to the serial bus
as a slave device. It is not used in the 3-wire serial I/O mode.
SVA is set by an 8-bit memory manipulation instruction.
The master outputs a slave address to the slaves connected to it, to select a specific slave. The slave address
output by the master and the value of the SVA are compared by an address comparator. If the two addresses
coincide, the slave is selected. At this time, bit 6 (COI) of the serial operation mode register 0 (CSIM0) is set
to 1.
The high-order 7 bits of data with its LSB masked by setting the bit 4 (SVAM) of the interrupt timing specification
register (SINT) can compare with the slave address.
If no coincidence is detected when the address is received, bit 2 (RELD) of the serial bus interface control
register (SBIC) is cleared to 0. The wake-up function can be used by setting bit 5 (WUP) of CSIM0 to 1 in
the I
2
C bus mode. In this case, an interrupt request signal (INTCSI0) is generated when the slave address
output by the master coincides with the value of SVA (the interrupt request signal is generated also when the
stop condition is detected). This interrupt indicates that the master requests communication. When using
the wake-up function, set SIC to 1.
When the microcontroller transmits data as the master or a slave in the 2-wire serial I/O mode or I
2
C mode,
errors can be detected by using SVA.
The contents of SVA become undefined when the RESET signal is input.