NEC mPD780852 Series Preliminary User's Manual page 196

8-bit single-chip microcontrollers
Table of Contents

Advertisement

(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.
Operation Mode
SIO2 Operation
Serial Operation Mode
Disabled (CSIE2 = 0)
Enabled (CSIE2 = 1)
Receive-only mode
(MODE2 = 1)
Transmit/receive
mode (MODE2 = 0)
Note
Master/slave can be selected by setting bits 0 and 1 (CSK1 and SCL20) of the serial operation mode
register 2 (CSIM2).
196
CHAPTER 14 SERIAL INTERFACE SIO2
Table 14-3. Operation Mode and Pin Status
Note
Master/Slave
Master
Slave
Master
Slave
Preliminary User's Manual U14581EJ3V0UM00
Pin
P03/SCK2
P04/SO2
Port function
Port function
Serial function
Port function
Hi-Z
Port function
Serial function
Serial function
Hi-Z
Serial function
P05/SI2
Port function
Hi-Z
Hi-Z
Hi-Z
Hi-Z

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780851Mpd780851aMpd780852aMpd78f0852

Table of Contents