User's Manual

ACR122L-ACS Design Specification
Version 0.03 19/05/2010
Page
22
50
ACR122L
-
ACS
Example 2. How to handle Value Blocks of MIFARE 1K/4K Tag?
The value blocks are used for performing electronic purse functions. E.g. Increment, Decrement,
Restore and Transfer .. etc. The value blocks have a fixed data format which permits error detection
and correction and a backup management.
Byte Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Description
Value
______
Value
Value
Adr
___
Adr
Adr
___
Adr
Value: A signed 4-Byte value. The lowest significant byte off a value is stored in the lowest address
byte. Negative values are stored in standard 2’s complement format.
Adr: 1-Byte address, which can be used to save the storage address of a block. (optional)
e.g. Value 100 (decimal) = 64 (Hex), assume Block = 0x05
The formatted value block = 64 00 00 00 9B FF FF FF 64 00 00 00 05 FA 05 FA
Step 1) Update the content of Block 05 with a value 100 (dec)
<< 02 6F 1A 00 00 00 00 01 00 00 00
FF 00 00 00 15 D4 40 01 A0 05 64 00 00 00 9B FF FF FF 64 00 00 00 05
FA 05 FA [Checksum] 03
>> 02 6F 0A 00 00 00 00 01 00 00 00
FF 00 00 00 05 D5 41 [00] 90 00 [Checksum] 03
Step 2) Increment the value of Block 05 by 1 (dec)
<< 02 6F 0E 00 00 00 00 01 00 00 00
FF 00 00 00 09 D4 40 01 C1 05 01 00 00 00 [Checksum] 03
>> 02 6F 0A 00 00 00 00 01 00 00 00
FF 00 00 00 05 D5 41 [00] 90 00 [Checksum] 03
Tip: Decrement the value of Block 05 by 1 (dec)
<< 02 6F 0E 00 00 00 00 01 00 00 00
FF 00 00 00 09 D4 40 01 C0 05 01 00 00 00 [Checksum] 03
Step 3) Transfer the prior calculated value of Block 05 (dec)
<< 02 6F 0A 00 00 00 00 01 00 00 00
FF 00 00 00 05 D4 40
01 B0 05 [Checksum] 03