ML51/ML54/ML56
Sep. 01, 2020
Page
506
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
2. Stop SC_CLK by programming CLKKEEP (SCCR2[
1]) to ‘0’ period of timing T8.
3.
Set SC_DAT to low by software programming to ‘0’ period of timing T8.
4.
Deactivate SC_PWR by software programming to ‘0’ period of timing T9.
Undefined
T7
T8
T9
Time
T7
T8
T9
Comment
T7
97
145
177
177
T8
T9
83
87
131
135
163
167
163
167
Unit
SC Clock
Deactivation Trigger to SC_RST Low
SMC_ RST Low to Stop SC _CLK
Stop SC_ CLK to Stop SC_PWR
SC_DAT
SC_RST
SC_CLK
SC_PWR
Table 6.10-3 SC Deactivation Sequence
UART Mode
6.10.4.2
When the UARTEN (SCCR2[0]) bit is set, the Smart Card Interface controller can also be used as
basic UART function. The following is the program example for UART mode.
Programming example:
1. Set UARTEN (SCCR2[0]) bit to enter UART mode.
2.
Fill “0” to CONSEL (SCnCR1[4]) and AUTOCEN (SCnCR1[3]) field. (In UART mode, those
fields must be “0”)
3. Select the UART baud rate by setting ETURDIV[11:0] ({SCnETURD1[3:0]:SCnETURD0[7:0]})
fields. For example, if smartcard module clock is 12 MHz and target baud rate is 115200bps,
ETURDIV should fill with (12000000 / 115200
– 1).
4. Select the data format include data length (by setting WLS (SCCR2[5:4]), parity format ( by
setting OPE (SCCR2[7]) and PBOFF (SCCR2[6]) ) and stop bit length (by setting NSB
(SCnCR1[7])).
5. Write the SCnDR (SCnDR[7:0]) (TX) register or read the SCnDR (SCnDR[7:0]) (RX) register
can perform UART function.
6.10.5 Smart Card Data Transfer
Basically, the smart card interface acts as a half-duplex asynchronous communication port and its
data format is composed of ten consecutive bits which is showman.
Start
Pause
Start
D1
Delay Between Consecutive Characters
D2
D3
D4
D5
D6
D7
D8
P
Figure 6.10-3 SC Data Character
Initial Character TS
6.10.5.1
According to 7816-3, the initial character TS has two possible patterns shown in Figure 6.10-4 Initial