Professional Documents
Culture Documents
AppNote 407
Application Note 407
Title:
EM4170 Application Note
Product Family: RFID
TABLE OF CONTENT
1 Introduction....................................................................................................................................................................... 2
2 General Operation ............................................................................................................................................................ 2
3 Internal structure............................................................................................................................................................... 4
3.1 Memory organization ................................................................................................................................................. 5
4 Authentication Procedure ................................................................................................................................................. 6
4.1 Timing........................................................................................................................................................................ 7
5 Communication details ..................................................................................................................................................... 8
5.1 Status information...................................................................................................................................................... 8
5.2 Standby Mode ........................................................................................................................................................... 9
5.3 Receive Mode............................................................................................................................................................ 9
5.4 Command Set............................................................................................................................................................ 9
6 Software implementation .................................................................................................................................................. 9
6.1 Reading Listen Windows ........................................................................................................................................... 9
6.2 Synchronization to send the first “0” ........................................................................................................................ 11
6.3 Sending data to the transponder ............................................................................................................................. 11
6.4 Synchronizing to the header.................................................................................................................................... 13
6.5 Reading data from the transponder ......................................................................................................................... 13
7 Programming the E²PROM............................................................................................................................................. 14
8 Appendix......................................................................................................................................................................... 15
5V
3
6
DVDD
VDD
to µC
Coil1 2 12
ANT1 OUT
11
IN from µC
EM4170
V4170 4
CLK
10
from µC
ANT2
Coil2
Reader EC
16
7
DEMOD_IN IC 9
CDEC_IN
CAGND
8
CDEC_OUT
DVSS
CDC
VSS
CF
GND
13
15
14
5
1
GND GND GND GND
external Antenna
VDD
VSS
Reset
Clock Sequencer
Extractor
Data Command
Extractor Decoder
User2 47 User2 32
Read and Write
User2 31 User2 16
User2 15 User2 00
Password 31 Password 16
Password 15 Password 00
Rnd
Crypt Key Random Crypt Key
56 Bit
f f
f(Rnd,K)
f(Rnd,K) f(Rnd,K)
28 Bit
=?
g
no action
g
g(Rnd,f,K)
no action
g(Rnd,f,K)
=? g(Rnd,f,K)
20 Bit
o.k.
Action 0ms 10ms 20ms 30ms 40ms 50ms 60ms 70ms 80ms
Compare ID ~2ms
Command: Authentication 6 Bit 5.4ms (3 LIWs)
Command Pattern
Read ID 0011
Read UM 1 0101 STOP
Authentication 0110
Write Word 1010
Figure 7: Software structure
Send PIN 1001
For reading transponder signals the used µController
Read UM 2 1111 should be able at least to measure pulse widths or pulse
periods and to switch to the inverted measuring edge
The leftmost bit is the first received bit and the rightmost (falling / falling ↔ rising / rising) while reading. It is
one is the parity bit. recommended to use an Input Capture Timer with a
minimum resolution of 5 µs (better 0,5 - 2 µs) to
Reading a valid command (plus data bits respectively), determine the pulse lengths. The timer shall be able to
the transponder sends back data or starts an internal measure up to 848µs (96 + 10 periods) for a 125kHz
write process depending on the command. fixed frequency system as described below.
An invalid command changes back to Standby Mode. Please note that the reading software algorithms (LIW,
Data) must be able to handle non-inverted and inverted
signals from the reader demodulator output.
For sending bits to the transponder the µController
6 Software implementation should generate a fixed time cycle synchronized to the
EM4170 uplink data rate. A timer in Compare / Timer
Corresponding to the different modes explained above Mode is recommended.
the following structure for the software implementation
can be used.
6.1 Reading Listen Windows
The first step is to synchronize transponder and reader
by reading the Listen Window pattern.
Transponder
coil
32
(1) Reader delay (3) Switch from READ to WRITE (4) Time to start first “0“
16 16 64 32 32 16 16 64 32 32 16 16 64 32 32
Data line
non-inverted
80 80 96 64
(2) Toggle measuring edge (5) Do not start first „0“ here
Transceiver
coil
Periods RF 16 16 16 16
Header Data
Data line
non-inverted
16
After sending the last bit to the transponder the software 6.5 Reading data from the transponder
should switch the reader from Write to Read Mode if Data can be decoded by reading pulse periods always
necessary. During the first header bits when the reader is beginning in the middle of a bit period. One practicable
settling and the data line is unstable the software should algorithm for the non-inverted data line is described here:
not start the read timer. It is useful to run the Write Timer
some further cycles with RF field ON until data are
stable. Then the Read algorithm can be started. Measured Length Decoded Decoded Further
Changing from “1” to “0” in the header results in a pulse pulse limits bits with bits with Action
of one bit period which can be used for the software to length falling rising
synchronize for the data bits. edge edge
The 4 bits “0” of the header can be ignored by the 1 3/4 < 5/4 “0” “1” continue
software or can be read into the data buffer by the Data 1.5 5/4 < 7/4 “11” “00” toggle edge
Read algorithm. type
The signals ACK and NAK are sometimes difficult to 2 7/4 < 9/4 “10” “01” continue
read. In this case software can verify the operation by
read commands.
Starting point is the falling edge of the last header “0”
(values in bit periods)
Pulse tolerances can be set to a bit period divided by 4.
Between the highest and lowest allowed pulse length no
pulses should be excluded.
If the expected number of bits are read the algorithm is
stopped.
For inverted data line the same algorithm can be used,
only the reading edges must be inverted.
Algorithms reading pulse width will work as well but may
have an increased interrupt load and a higher
susceptibility for jittering signals.
Action -10ms 0ms 10ms 20ms 30ms 40ms 50ms 60ms 70ms
Acknowledge 1.3ms
Start 41.3ms
Datasheet
EM4095 Read/Write analog front end for 125kHz RFID
Basestation
EM Microelectronic-Marin SA, Marin, 2000
Datasheet
EM4170 Crypto Contactless Identification Device
EM Microelectronic-Marin SA, Marin, 2001
EM Microelectronic-Marin SA cannot assume responsibility for use of any circuitry described other than circuitry
entirely embodied in an EM Microelectronic-Marin SA product. EM Microelectronic-Marin SA reserves the right to
change the circuitry and specifications without notice at any time. You are strongly urged to ensure that the
information given has not been superseded by a more up-to-date version.