13-8
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
13.5.3.
Data Reception
A data receiving procedure and the UART3 Ch.
n
operations are shown below. Figures 13.5.3.1 and
13.5.3.2 show a timing chart and flowcharts, respectively.
Data receiving procedure (read by one byte)
1.
Wait for a UART3 interrupt when using the interrupt.
2.
Check to see if the UART3_
n
INTF.RB1FIF bit is set to 1 (receive buffer one byte full).
3.
Read the received data from the UART3_
n
RXD register.
4.
Repeat Steps 1 to 3 (or 2 and 3) until the end of data reception.
Data receiving procedure (read by two bytes)
1.
Wait for a UART3 interrupt when using the interrupt.
2.
Check to see if the UART3_
n
INTF.RB2FIF bit is set to 1 (receive buffer two bytes full).
3.
Read the received data from the UART3_
n
RXD register twice.
4.
Repeat Steps 1 to 3 (or 2 and 3) until the end of data reception.
UART3 data receiving operations
The UART3 Ch.
n
starts data receiving operations when a start bit is input to the USIN
n
pin.
After the receive circuit has detected a low level as a start bit, it starts sampling the following
data bits and loads the received data into the receive shift register. The UART3_
n
INTF.RBSY bit is set
to 1 when the start bit is detected.
The UART3_
n
INTF.RBSY bit is cleared to 0 and the receive shift register data is transferred to the
receive data buffer at the stop bit receive timing.
The receive data buffer consists of a 2-byte FIFO and receives data until it becomes full. When the
receive data buffer receives the first data, it sets the UART3_
n
INTF.RB1FIF bit to 1 (receive buffer one
byte full). If the second data is received without reading the first data, the UART3_
n
INTF.RB2FIF bit is
set to 1 (receive buffer two bytes full).
Figure 13.5.3.1 Example of Data Receiving Operations
Figure 13.5.3.2 Data Reception Flowcharts
D0
...
p
D0
...
p
D0
...
p
D0
...
p
UART3_
n
RXD data 1 (R)
UART3_
n
RXD data 3 (R)
UART3_
n
RXD data 2 (R)
st
sp
st
sp
st
sp
st
sp
USINn
UART3_nINTF.RB1FIF
UART3_nINTF.RB2FIF
UART3_nINTF.RBSY
Software operations
data 1
data 2
data 3
data 4
(st: start bit, sp: stop bit, p: parity bit)
Data reception (1 byte read)
End
Wait for an interrupt request
(UART3_
n
INTF.RB1FIF = 1)
Read receive data (1 byte) from
the UART3_
n
RXD register
Receive data remained?
Data reception (2 bytes read)
End
Wait for an interrupt request
(UART3_
n
INTF.RB2FIF = 1)
Read receive data (1 byte) from
the UART3_
n
RXD register
Read receive data (1 byte) from
the UART3_
n
RXD register
Receive data remained?
No
Yes
No
Yes
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...