RX610 Group
20. Serial Communications Interface (SCI)
R01UH0032EJ0120 Rev.1.20
Page 646 of 1006
Feb 20, 2013
20.3.5
Serial Data Transmission (Asynchronous Mode)
Figure 20.8 shows an example of the operation for serial transmission in asynchronous mode.
In serial transmission, the SCI operates as described below.
1. The SCI transfers data from TDR to TSR when data is written to TDR in the TXI interrupt processing routine. The
TXI interrupt request at the beginning of transmission is generated when the TE bit in SCR is set to 1 after the TIE
bit in SCR is set to 1 or when these two bits are set to 1 simultaneously by a single instruction.
2. After transferring data from TDR to TSR, the SCI starts transmission. If the TIE bit is set to 1 at this time, an
SCR.TXI interrupt request is generated. Continuous transmission is enabled by writing the next transmit data to TDR
in the TXI interrupt processing routine before transmission of the current transmit data is completed.
3. Data is sent from the TxDn pin in the following order: start bit, transmit data, parity bit (may be omitted depending
on the format), and stop bit.
4. The SCI checks for updating of (writing to) the TDR at the time of stop bit output.
5. When TDR is updated, the next transmit data is transferred from TDR to TSR, the stop bit is sent, and then serial
transmission of the next frame is started.
6. If TDR is not updated, the TEND flag in SSR is set to 1, the stop bit is sent, and then the mark state is entered in
which high is output. If the TEND flag in SSR is set to 1 at this time, a TEI interrupt request is generated.
Figure 20.9 shows a sample flowchart for serial transmission in asynchronous mode.
TXI interrupt signal
0
1 frame
D0
D1
D7
0/1
1
0
D0
D1
D7
0/1
1
1
1
Data
Data
Parity
bit
Stop
bit
Start
bit
Parity
bit
Stop
bit
Start
bit
Idle state
(mark state)
TEI interrupt
request
generated
TXI interrupt
request
generated
Data written to TDR in TXI
interrupt processing
routine
TXI interrupt
request
generated
SSR.TEND flag
Note:
*
For the corresponding interrupt vector number, see section 10, Interrupt Control Unit (ICU).
Figure 20.8 Example of Operation for Serial Transmission in Asynchronous Mode
(Example with 8-Bit Data, Parity, One Stop Bit)