English
Language : 

UPD784938 Datasheet, PDF (465/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 19 3-WIRE SERIAL I/O MODE
19.4.3 Operation when reception only is enabled
To enable only reception, set (to 1) the ENCSI and CRXE bits of the clocked serial interface mode register (CSIM). Also
set the P33/SO0 pin in the port mode by using the port 3 mode control register (PMC3) (if this pin is not set in the port mode,
it outputs data). Reception can be started by reading the serial shift register (SIO).
19.4.4 Operation when transmission/reception is enabled
When the ENCSI bit and CRXE bit of the clocked serial interface mode register (CSIM) are both set (to 1), a transmit
operation and receive operation can be performed simultaneously (transmit/receive operation). Both transmission and
reception can be started by writing data to SIO when both the ENCSI and CRXE bits are set (to 1).
(a) When the internal clock is selected as the serial clock
When transmission/reception starts, the serial clock is output from the SCK0 pin, data is output in sequence from serial
shift register (SIO) to the SO0 pin in synchronization with the fall of the serial clock, and SI0 pin data is shifted in order
into SIO in synchronization with the rise of the serial clock.
There is a delay of up to one SCK0 clock cycle between the start of transmission and the first fall of SCK0.
(b) When an external clock is selected as the serial clock
When transmission/reception starts, data is output in sequence from serial shift register (SIO) to the SO0 pin in
synchronization with the fall of the serial clock input to the SCK0 pin after the start of transmission/reception, and SI0
pin data is shifted in order into SIO in synchronization with the rise of the serial clock. If transmission/reception has
not started, shift operations are not performed and the SO0 pin output level does not change even if the serial clock
is input to the SCK0 pin.
Caution When the external clock is selected, do not input the serial clock to the SCK0 pin before setting
transmit data to SIO after transmission has been started. Otherwise, undefined data may be output.
Similarly, do not use the macro service when the external clock is selected.
19.4.5 Corrective action in case of slippage of serial clock and shift operations
When an external clock is selected as the serial clock, there may be slippage between the number of serial clocks and
shift operations due to noise, etc. In this case, since the serial clock counter is initialized by disabling both transmit operations
and receive operations (by clearing (to 0) the ENCSI bit), synchronization of the shift operations and the serial clock can
be restored by using the first serial clock input after reception or transmission is next enabled as the first clock.
Preliminary User’s Manual U13987EJ1V0UM00
465