Data Reception - Epson S1C17W03 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

UART data sending operations
The UART 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

12.5.3 Data Reception

A data receiving procedure and the UART Ch.n operations are shown below. Figures 12.5.3.1 and 12.5.3.2 show a
timing chart and flowcharts, respectively.
Data receiving procedure (read by one byte)
1. Wait for a UART interrupt when using the interrupt.
2. Check to see if the UAnINTF.RB1FIF bit is set to 1 (receive buffer one byte full).
3. Read the received data from the UAnRXD register.
4. Repeat Steps 1 to 3 (or 2 and 3) until the end of data reception.
S1C17W03/W04 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 12.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 12.5.2.2 Data Transmission Flowchart
Seiko Epson Corporation
D7 p sp
NO
YES
Wait for an interrupt request
(UAnINTF.TBEIF = 1)
12 UART (UART)
st D0 D1
D7 p sp
Data (W) → UAnTXD
1 (W) → UAnINTF.TENDIF
(st: start bit, sp: stop bit, p: parity bit)
12-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17w04

Table of Contents