R01UH0092EJ0110 Rev.1.10
Page 512 of 807
Jul 31, 2012
M16C/64C Group
23. Serial Interface UARTi (i = 0 to 2, 5 to 7)
Figure 23.36 shows the Example of SIM Interface Connection. Connect pins TXD2 and RXD2, and then
place a pull-up resistance.
Figure 23.36 Example of SIM Interface Connection
23.3.6.1
Parity Error Signal Output
The parity error signal is enabled by setting the U2ERE bit in the U2C1 register to 1 (error signal
output).
The parity error signal is output when a parity error is detected while receiving data. A low-level signal is
output from the TXD2 pin in the timing shown in Figure 23.37. If the U2RB register is read while
outputting a parity error signal, the PER bit is cleared to 0 (no parity error) and at the same time the
TXD2 output again goes high.
When transmitting, a transmission complete interrupt request is generated at the falling edge of the
transmit/receive clock pulse that immediately follows the stop bit. Therefore, whether a parity error
signal has been returned can be determined by reading the port that shares the RXD2 pin in a
transmission complete interrupt routine.
Figure 23.37 Parity Error Signal Output Timing
MCU
SIM card
TXD2
RXD2
ST : Start bit
P
: Even parity
SP : Stop bit
D0
D1
D2
D3
D4
D5
D6
D7
P
SP
ST
(NOTE 1)
Transmit/receive clock
RXD2
TXD2
RI bit in the
U2C1 register
The timing diagram assumes the direct format is implemented.
Note:
1. MCU output is high-impedance (pulled up externally).
High
Low
High
Low
High
Low
1
0
Summary of Contents for M16C Series
Page 846: ...M16C 64C Group R01UH0092EJ0110...