Irda Interface - Epson S1C17F13 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

10 UART (UART)
Data receiving procedure (read by two bytes)
1. Wait for a UART interrupt when using the interrupt.
2. Check to see if the UAnINTF.RB2FIF bit is set to 1 (receive buffer two bytes full).
3. Read the received data from the UAnRXD register twice.
4. Repeat Steps 1 to 3 (or 2 and 3) until the end of data reception.
UART data receiving operations
The UART Ch.n starts data receiving operations when a start bit is input to the USINn 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 UAnINTF.RBSY bit is set to 1 when the start bit is
detected.
The UAnINTF.RBSY bit is cleared to 0 and the receive shift register data is transferred to the receive data buf-
fer 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 UAnINTF.RB1FIF bit to 1 (receive buffer one byte full). If the second
data is received without reading the first data, the UAnINTF.RB2FIF bit is set to 1 (receive buffer two bytes
full).
USINn
UAnINTF.RB1FIF
UAnINTF.RB2FIF
UAnINTF.RBSY
Software operations
Data reception (1 byte read)
Wait for an interrupt request
(UAnINTF.RB1FIF = 1)
Read receive data (1 byte) from
the UAnRXD register
Receive data remained?
NO
End
10.5.4

IrDA Interface

This UART includes an RZI modulator/demodulator circuit enabling implementation of IrDA 1.0-compatible infra-
red communication function simply by adding simple external circuits.
Set the UAnMOD.IRMD bit to 1 to use the IrDA interface.
Data transfer control is identical to that for normal interface even if the IrDA interface function is enabled.
10-6
data 1
data 2
st D0
···
p sp st D0
UAnRXD → data 1 (R)
Figure 10.
5.3.1 Example of Data Receiving Operations
YES
Figure 10.
5.3.2 Data Reception Flowcharts
Seiko epson Corporation
data 3
···
p sp st D0
···
p sp st D0
(st: start bit, sp: stop bit, p: parity bit)
Data reception (2 bytes read)
Wait for an interrupt request
(UAnINTF.RB2FIF = 1)
Read receive data (1 byte) from
the UAnRXD register
Read receive data (1 byte) from
the UAnRXD register
Receive data remained?
NO
End
data 4
···
p sp
UAnRXD → data 3 (R)
UAnRXD → data 2 (R)
YES
S1C17F13 TeChniCal Manual
(Rev. 1.0)

Advertisement

Table of Contents
loading

Table of Contents