
264
CHAPTER 14 SERIAL INTERFACE UART0
User
’
s Manual U14260EJ3V1UD
14.4.3 Infrared data transfer mode
In infrared data transfer mode, pulses can be output and received in the data format shown in (2).
(1) Registers to be used
Asynchronous serial interface mode register 0 (ASIM0)
Asynchronous serial interface status register 0 (ASIS0)
Baud rate generator control register 0 (BRGC0)
Port mode register 2 (PM2)
Port register 2 (P2)
The relationship between the register settings and pins is shown below.
Table 14-5. Relationship Between Register Settings and Pins (Infrared Data Transfer Mode)
ASIM0
PM23 P23 PM24 P24
Operation Mode
Pin Function
TXE0
RXE0
PS01
PS00
CL0
SL0
ISRM0
IRDAM0
P23/
RxD0
P24/
TxD0
0
1
0/1
0/1
0/1
×
0/1
0
1
×
×
Note
×
Note
Reception
RxD0
P24
1
0
0/1
0/1
0/1
0/1
×
0
×
Note
×
Note
0
0
Transmission
P23
TxD0
1
1
0/1
0/1
0/1
0/1
0/1
0
1
×
0
0
Transmission/reception
RxD0
TxD0
Note
Can be set as port function.
Caution When using infrared data transfer mode, set baud rate generator control register 0 (BRGC0) to
10H.
Remark
×
: don
’
t care, ASIM0: Asynchronous serial interface mode register 0,
PM
××
: Port mode register, P
××
: Port output latch
(2) Data format
Figure 14-13 compares the data format used in UART mode with that used in infrared data transfer mode.
The IR (infrared) frame corresponds to the bit string of the UART frame, which consists of pulses that include
a start bit, eight data bits, and a stop bit.
The length of the electrical pulses that are used to transmit and receive in an IR frame is 3/16 the length of the
cycle time for one bit (i.e., the
“
bit time
”
). This pulse (whose width is 3/16 the length of one bit time) rises from
the middle of the bit time (see the figure below).
Bit time
Pulse width = 3/16 bit time