ACR122L – Communication Protocol
Version 1.03
www.acs.com.hk
Page 45 of 57
6.18.1. Handling the value blocks of Mifare 1K/4K tag
The value blocks are used for performing electronic purse functions, e.g. Increment, Decrement,
Restore, 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
Where:
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)
Example:
Value 100 (decimal) = 64 (Hex), assume Block = 05h
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 00 00 03
>> 02 80 05 00 00 00 00 01 00 00 00
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 00 00 03
>> 02 80 05 00 00 00 00 01 00 00 00
D5 41 [00] 90 00 [Checksum] 03
Note:
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