IC卡的传输协议T=0协议时序

The minimum interval between the leading edges of the start bits of two consecutive characters sent by the terminal to the ICC shall be between 12 and 266 etus as determined by the value of TC1 returned at the answer to reset (see sections 8.2 and 8.3). This interval may be less than the minimum interval of 16 etus allowed between two characters sent in opposite directions. If the value returned in TC1 is N, the ICC shall be able to correctly interpret characters sent by the terminal with a minimum interval between the leading edges of the start bits of two consecutive characters of 11.8 + N etus.

CGT:终端发送个IC卡的两个连续字符之间的最小时间间隔为12~266 etu(相当于停止位最小可以为2位)。TC1回返的N值用于计算CGT。主要用于控制终端发送字符的速度,不能超过IC卡可接受的速度。如果是通过7816控制器发送数据,则7816控制器会有一个寄存器保持该CGT的值,用于控制器自己控制发送的速度。实际代码的体现为,通过TC1的值来计算出CGT并保存到响应的寄存器中。

The minimum interval between the leading edges of the start bits of two consecutive characters sent by the ICC to the terminal shall be 12 etus. The terminal shall be able to correctly interpret characters sent by the ICC with a minimum interval between the leading edges of the start bits of two consecutive characters of 11.8 etus.

IC卡发送给终端的两个连续字符之间的最小时间间隔为12etu。即使最小间隔为11.8 etu,终端也应该可以正常处理。相当于对终端提出一个最低指标,主要看控制器是否符合该指标,实际代码中没有体现。

The maximum interval between the leading edge of the start bit of any character sent by the ICC and the leading edge of the start bit of the previous character sent either by the ICC or the terminal (the Work Waiting Time, or WWT) shall not exceed 960 x D x WI etus (D and WI are returned in TA1 and TC2, respectively).

WWT(工作等等时间):“IC发送下一个字符”与“IC发送的上一个字符”或“终端发送的最后一个字符”之间的最大时间间隔不超过960*D*WI etu。其中D值在TA1中,WI值在TC2中。主要用于终端接收字符时的超时处理,检测IC卡是否没了响应。

The terminal shall be able to correctly interpret a character sent by the ICC with a maximum interval between the leading edge of the start bit of the character and the leading edge of the start bit of the previous character sent either by the ICC or the terminal of {WWT + (D x 480)} etus. If no character is received, the terminal shall initiate the deactivation sequence within {WWT + (D x 9600)} etus following the leading edge of the start bit of the character from which the timeout occurred.

只要IC发送下一个字符在{WWT + (D x 480)} etu之内,终端都应该能够处理。即终端超时检测时间为{WWT + (D x 480)} etu。如果在该超时时间内,终端都没有收到下一个字符,则应在{WWT + (D x 9600)}etu内下电。实际代码的体现为,保存了{WWT + (D x 480)}值,用于超时检测处理,一般都能够在规定的时间内下电,所以{WWT + (D x 9600)}则不需要太担心。

For the ICC or terminal, the minimum interval between the leading edges of the start bits of the last character received and the first character sent in the opposite direction shall be 16 etus. The ICC or terminal shall be able to correctly interpret a character received within 15 etus timed from the leading edge of the start bit of the last character sent to the leading edge of the start bit of the received character. These timings do not apply during character repetition.

IC卡或终端在反方向的两个字符之间的最小时间间隔为16etu。

 


终端---->IC卡的连续两个字节:
在复位应答中,TC1的值决定了终端发送到IC卡的两个连续字符起始位下降沿之间的最小时间间隔在12~266个etu之间(总的保护时间为2~256 etu)。
(作用:相当于IC卡告诉终端卡片能接收的最快速度,终端发送数据不能过快,避免数据接收错误)

IC卡---->终端的连续两个字节:
IC发送到终端的两个连续字符起始位下降沿之间的最小时间间隔为12 etu。
(即要求终端要有最快的处理能力)

IC发送的任意字符的起始位下降沿与IC卡或终端发送的前一个字符的起始位下降沿之间的最大时间间隔(工作等待时间WWT)不能超过960*D*WI个etu。(D和WI分别在TA1和TC2中返回,D缺省值为1,WI缺省值为10,即不能超过9600个etu)
(作用:相当于IC卡发送两个字节之间的超时时间)

终端必须能够正确解释IC卡发送的起始位下降沿与IC卡或终端发送的上一个字符起始位下降沿最大间隔为WWT+(D*480)个etu的字符。如果没有接收到字符,终端必须在发生超时的字符起始位下降沿开始的WWT+(D*9600)个etu内启动下电时序。
(当发生字节间超时时,对终端的要求)

IC卡<---->终端相反方向:
对于IC和终端,在相反方向发送两个连续字符的起始位下降沿之间的最小时间间隔不能小于16个etu。IC卡或终端必须能够正确解释接收到的其起始位下降沿和最后发送的字节起始位下降沿间隔为15etu的字符。此处的时序不适用于重发字符。

 

原文地址:https://www.cnblogs.com/utank/p/5592428.html