Chapter 13
Serial Interface
Clock-Synchronous Communication XIII - 35
Transmission Data Buffer (TXBUFn) and Transmission Buffer Empty Flag (SCnTEMP)
TXBUFn is the buffer to store the data to be transmitted. SCnSTR.SCnTEMP is set to "1" when data is written to
TXBUFn, and is cleared to "0" when data in TXBUFn is transferred to the transmit shift register (SCnTRB) and
the serial communication starts.
Write data to TXBUFn only when SCnTEMP is "0". When writing the next data to TXBUFn during single byte
communication, the following communication will be automatically started after the present communication fin-
ishes. The blank period is different depending on the communication mode (consecutive communication mode/ 1-
byte communication mode).
When the LSI is a master, a wait time for communication start (T
wait
) of up to 3.5 transfer clocks is inserted until
communication starts after a data write to TXBUFn. When the LSI is a slave, T
wait
must be ensured until a trans-
fer clock is input after a data write to TXBUFn.
..
Write data to TXBUFn only when SCnSTR.SCnTEMP is "0".
If data is written to TXBUFn while SCnTEMP is "1", SCIFn does not work properly.
..
..
When the LSI is a slave, a transfer clock is not input to prevent abnormal operation caused
by external noise while serial communication is not executed. Transfer clock input is enabled
after a wait time (T
wait
) of 3.5 transfer clocks has elapsed after a data is written to TXBUFn.
..
Reception Data Buffer (RXBUFn) and Reception Buffer Empty Flag (SCnREMP)
RXBUFn is a buffer to store the received data. The received data in the reception shift register is transferred to
RXBUFn automatically.
SCnSTR.SCnREMP is set to "1" when reception data is stored in RXBUFn, and is cleared to "0" when the data is
read out from RXBUFn.
Be sure to read out the received data in RXBUFn before the following data reception finishes.
The received data in RXBUFn is updated with new data every time the data reception is completed.
..
Read out the received data of RXBUFn when SCnSTR.SCnREMP is "1".
If data is read from RXBUFn when SCnREMP is "0", SCIFn does not work properly.
When receiving the following data before reading the data in RXBUFn register, an overrun
error occurs.
..
Activation Source for Communication
Data write to TXBUFn is the trigger to start data transmission or reception.
When the LSI only receive data (not send data), write dummy data to TXBUFn.
First Bit Specification for Transfer
When SCnMD0.SCnDIR is "0", MSB-first transfer is selected.
When SCnMD0.SCnDIR is "1", LSB-first transfer is selected.