Elatec GmbH
Page 32 of 65
7.4.4 Mifare® Value Block Related Commands
A sector of a Mifare® transponder may contain so-
called „value blocks‟. A value block is a usual data
block, where the information is stored in a certain format. Special Mifare® commands like increment or
decrement may be applied to such a block, e.g. for electronic purse functionality. Value block
commands only work in combination with Mifare® Classic and Mifare® PLUS transponders. Please
note, that only Mifare® PLUS X transponders support value block commands in SL3.
A value block contains 4 bytes user data, the remaining 12 bytes are processed internally by the
Mifare® transponder for increased data integrity.
A value block is formatted as follows:
Byte
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Data
Value
Value
¯¯¯¯
Value
A
A
¯
A
A
¯
The value data is stored three times: twice non-inverted and once inverted. The lowest significant byte
is stored in the lowest address byte. The last four bytes are for internal use and shall not be altered.
The following diagram shows the typical command-flow in order to work with Mifare® value blocks:
Select
Transponder
‚s‟ / ‚m‟
Log into
sector ‚l‟/‟nl‟
Create value
block ‚wv‟
Increment ‚+‟
Decrement ‚-‚
Copy ‚=‟
Read value
block ‚rv‟