196
CHAPTER 14 SERIAL INTERFACE SIO2
Preliminary User’s Manual U14581EJ3V0UM00
(4) Operation mode
(a) Master mode (with internal clock SCK2)
Serial interface SIO2 operates in the master mode (with internal clock SCK2) if bits 1 and 0 (SCL21 and
SCL20) of the serial operation mode register 2 (CSIM2) are set to (0, 1), (1, 0), or (1, 1).
Transfer is started when data has been read from or written to the serial I/O shift register 2 (SIO2). The
serial data is output from the SO2 pin in synchronization with the serial clock. Select the operating clock
for serial transfer by using SCL21 and SCL20.
Transfer is completed and a transmit completion interrupt (INTCSI2) occurs when all the 8 bits of the serial
data have been completely transferred.
(b) Slave mode (with external clock)
Serial interface SIO2 operates in the slave mode (with an external clock) if bits 1 and 0 (SCL21 and SCL20)
of the serial operation mode register 2 (CSIM2) are set to (0, 0). In the slave mode, the SCK2 pin operates
as an external serial clock input pin.
Serial data is transferred to SIO2 in synchronization with the externally input serial clock. After the serial
data has been received by SIO2, it is transferred to the serial receive data buffer register (SIRB2). At the
same time, the SDVA flag is set to 1 and a transmit completion interrupt (INTCSI2) occurs.
Caution
To prevent the occurrence of an overflow error, read the value of SIRB2 before the next
serial data is transferred to SIO2.
Table 14-3 below shows the status of the P03/SCK2, P04/SO2, and P05/SI2 pins in each operation mode.
Table 14-3. Operation Mode and Pin Status
Operation Mode
Pin
SIO2 Operation
Serial Operation Mode
Master/Slave
Note
P03/SCK2
P04/SO2
P05/SI2
Disabled (CSIE2 = 0)
—
—
Port function
Port function
Port function
Enabled (CSIE2 = 1)
Receive-only mode
Master
Serial function
Port function
Hi-Z
(MODE2 = 1)
Slave
Hi-Z
Port function
Hi-Z
Transmit/receive
Master
Serial function
Serial function
Hi-Z
mode (MODE2 = 0)
Slave
Hi-Z
Serial function
Hi-Z
Note
Master/slave can be selected by setting bits 0 and 1 (CSK1 and SCL20) of the serial operation mode
register 2 (CSIM2).
Содержание mPD780851
Страница 2: ...2 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 8: ...8 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 12: ...12 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 26: ...26 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 46: ...46 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 74: ...74 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 90: ...90 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 100: ...100 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 136: ...136 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 142: ...142 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 186: ...186 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 222: ...222 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 230: ...230 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 240: ...240 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 262: ...262 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 296: ...296 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 304: ...304 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...
Страница 314: ...314 Preliminary User s Manual U14581EJ3V0UM00 MEMO ...