at83c5122 ATMEL Corporation, at83c5122 Datasheet - Page 67

no-image

at83c5122

Manufacturer Part Number
at83c5122
Description
At83c5123 C51 Microcontroller With Usb And Smart Card Reader Interfaces
Manufacturer
ATMEL Corporation
Datasheet
Functional Description
Barrel Shifter
SCART FSM
ETU Counter
Guard Time Counter
4202E–SCR–06/06
IEC7816-3 says this procedure is mandatory in ATR for card supporting T=0 while EMV
says this procedure is mandatory for T=0 but does not apply for ATR.
The architecture of the Smart Card Interface Block can be detailed as follows:
The Barrel Shifter performs the translation between 1 bit serial data and 8 bits parallel
data
The barrel function is useful for character repetition since the character is still present in
the shifter at the end of the character transmission.
This shifter is able to shift the data in both directions and to invert the input or output
value in order to manage both direct and inverse ISO7816-3 convention.
Coupled with the barrel shifter is a parity checker and generator.
There are 2 registers connected to this barrel shifter, one for the transmission and one
for the reception. They act as buffers to relieve the CPU of timing constraints.
(Smart Card Asynchronous Receiver Transmitter Finite State Machine)
This is the core of the block. Its purpose is to control the barrel shifter. To sequence cor-
rectly the barrel shifter for a reception or a transmission, it uses the signals issued by the
different counters. One of the most important counters is the guard time counter that
gives time slots corresponding to the character frame.
The SCART FSM is enabled only in UART mode.
The transition from the receipt mode to the transmit mode is done automatically. Priority
is given to the transmission. Transmission refers to Terminal transmission to the ICC.
Reception refers to reception by the Terminal from the ICC.
The ETU (Elementary Timing Unit) counter controls the working frequency of the barrel
shifter, in fact it generates the enable signal of the barrel shifter. It receives the Card
Clock, and generates the ETU clock. The Card Clock frequency is called “f” below. The
ETU counter is 11 bit wide.
A special compensation mode can be activated. It accomodates situations where the
ETU is not an integer number of Card Clock (CK_ISO). The compensation mode is con-
trolled by the COMP bit in SCETU1 register bit position 7. With COMP=1 the ETU of
every character even bits is reduced by 1 Card Clock period. As a result, the average
ETU is : ETU_average = (ETU - 0.5). One should bear in mind that the ETU counter
should be programmed to deliver a faster ETU which will be reduced by the COMP
mechanism, not the other way around. This allows to reach the required precision of the
character duration specified by the ISO7816-3 standard.
Example1 : F=372, D=32 => ETU= F/D = 11.625 clock cycles.
We select ETU[10-0] = 12 , COMP=1. ETUaverage= 12 - (0.5*COMP) = 11.5
The result will be a full character duration (10 bit) = (10 - 0.107)*ETU. The EMV specifi-
cation is (10 +/- 0.2)*ETU
The minimum time between the leading edge of the start bit of 2 consecutive characters
transmitted by the Terminal is controlled by the Guard Time counter, as described in
Figure 33.
AT8xC5122/23
67

Related parts for at83c5122