deep understanding 7816 ( 1 " ---- about f/d and etu
for engineers who have just come into contact with smart cards, reading7816-3norms, often confused by some of the terms, read it will feel a bit awkward. Especially when you see the reset response.Fand theDsettings and the correspondingETU, it feels a little complicated and difficult to understand.
actually, in essence, 7816-3 defines a smart card (this refers to a contact- CPU cards, for logical encryption cards, and for non-contact IC card) and the communication protocol between the read and write devices, is plainly the format of data bit transmission.
If you learn or touch a single-chip computer, then forRS232must not be strange, it belongs to the asynchronous serial Communication Interface (UART), byRxD,TxDto send and receive data,RS232used to bePCstandard for the machine, but currentlyPCThe basic no longer exists (of course, you can also passUSB-232Converter to expand).
now let's see .7816-3the definition of the communication protocol, in fact, can basically be said to beRS232and improvements made on this basis,7816only one ofIOboth the ability to send and receive data, andRS232withRxDand theTxDsending and receiving data is different. In theRS232in We have9600The concepts of baud rate, start bit, parity bit, stop bit, and7816-3have been preserved in their entirety, but7816-3introduced in theETU, no usebps, but the rationale is the same. ETU
by definition when the smart card is reset by the 1 etu = 372/f f = reading and writing device through CLK The clock frequency provided to the smart card by the pin, usually in 1--5 MHz
ETUis the unit of time in seconds (milliseconds, microseconds), equivalent to the time required to transmit each data bit. The inverse of this is the data bits transmitted per second, i.e.bps. We takef = 3.579545 MHz, with3579545divided by372result equals9622.4about the9600 bps.
General-PurposeETUCalculation formula:1 ETU = (f/d) * (f/f),Fand theDThe value is based on7816-3The conventions in the specification to be set. Value for power-on resetF = 372,D = 1that is, as the default valueFdand theDd. If the smart card supports other rates, you need toATRin theTA1to point out the otherFand theDvalues, such as settingf=372, you can putDset to2/4, the communication rates that the smart card can support can be19200/38400.
So why choose a clock frequency of3.579545 MHz? Why is the defaultFvalue is selected as372it? First3.579545 MHzis the nominal value of quartz crystals commonly used,9600 * 372 = 3.5712 MHz, the closest to it. Besides, why is it?372,372 = *. Standard of8051single chip microcomputer each instruction cycle is Aclock cycles, and timing/The counter also follows1/12To be counted after the crossover, this setting for the smart card chip can be relatively easy to achieveIOdata communication control, but also better with the PC serial port 9600 speed matching (of course, this refers to the last century theera, the current smart card chip design technology to achieve arbitrary frequency division control is not a problem).
Thus, the choice of these parameters is to make better use of the existing standards and technologies, you know7816-3in the1989years have been enacted, according to the prevailingPCset the serial port rate to9600, with a232interface chip (e.g.Max232) plus3.579545MHzCrystal oscillator, and several pieces of Aboutseries of gate circuits plus5DC power supply for voltsand several blocking container parts, this is the most basicRS232serial reader.
In-depth understanding of 7816 (1)----about F/D and ETU