Data Transmission - Epson S1C17M12 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

11.5.2 Data Transmission

A data sending procedure and the UART3 Ch.n operations are shown below. Figures 11.5.2.1 and 11.5.2.2 show a
timing chart and a flowchart, respectively.
Data sending procedure
1. Check to see if the UAnINTF.TBEIF bit is set to 1 (transmit buffer empty).
2. Write transmit data to the UAnTXD register.
3. Wait for a UART3 interrupt when using the interrupt.
4. Repeat Steps 1 to 3 (or 1 and 2) until the end of transmit data.
UART3 data sending operations
The UART3 Ch.n starts data sending operations when transmit data is written to the UAnTXD register.
The transmit data in the UAnTXD register is automatically transferred to the shift register and the UAnINTF.
TBEIF bit is set to 1 (transmit buffer empty).
The USOUTn pin outputs a start bit and the UAnINTF.TBSY bit is set to 1 (transmit busy). The shift register
data bits are then output successively from the LSB. Following output of MSB, the parity bit (if parity is en-
abled) and the stop bit are output.
Even if transmit data is being output from the USOUTn pin, the next transmit data can be written to the
UAnTXD register after making sure the UAnINTF.TBEIF bit is set to 1.
If no transmit data remains in the UAnTXD register after the stop bit has been output from the USOUTn pin,
the UAnINTF.TBSY bit is cleared to 0 and the UAnINTF.TENDIF bit is set to 1 (transmission completed).
USOUTn
UAnINTF.TBEIF
UAnINTF.TBSY
UAnINTF.TENDIF
Software operations
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
st D0 D1 D2 D3 D4 D5 D6 D7 p sp st D0 D1
Data (W) → UAnTXD
Data (W) → UAnTXD
Figure 11.5.2.1 Example of Data Sending Operations
Data transmission
Read the UAnINTF.TBEIF bit
UAnINTF.TBEIF = 1 ?
YES
Write transmit data to
the UAnTXD register
Transmit data remained?
NO
End
Figure 11.5.2.2 Data Transmission Flowchart
Seiko Epson Corporation
D7 p sp
NO
YES
Wait for an interrupt request
(UAnINTF.TBEIF = 1)
11 UART (UART3)
st D0 D1
D7 p sp
Data (W) → UAnTXD
1 (W) → UAnINTF.TENDIF
(st: start bit, sp: stop bit, p: parity bit)
11-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17m13

Table of Contents