Specifications
ACR30 Reference Manual
Version 3.3 January 2009
Page 31 of 44
ACR30
The protection bits are only returned in the response data if the start address ADDR specified in the
command is < 20
H
, i.e., it is lying within the first 32 bytes of card memory which can be write
protected.
Accordingly, the number of PROT bytes returned depends on how many of the data bytes read lie
within the protectable area. If all data bytes read are outside the protectable area, only the data bytes
read from the card are returned in the response, no PROT bytes are returned.
The arrangement of the protection bits in the PROT bytes is as follows:
PROT 1 PROT 2 ....
P8 P7 P6 P5 P4 P3 P2 P1 P16 P1
5
P1
4
P1
3
P1
2
P
11
P1
0
P9 .. .. .. .. .. .. P1
8
P17
Px is the protection bit of BYTE x in the response data
'0' : byte is write protected
'1' : byte can be written
9.2.3.4. WRITE_DATA (*)
To write the specified data bytes to the specified address of the card inserted.
Command format
Instruction Code Data length Data
LEN ADDR BYTE 1 ... ... BYTE
N
91
H
LEN Number of data bytes to be written to the card, N, + 2
ADDR Byte address in the card of the first byte to be written. The high byte of the address is
specified as the first byte of ADDR.
BYTE x Byte values to be written to the card starting at address ADDR. BYTE 1 is written to
address ADDR; BYTE N is written to address ADDR+N-1.
Response data format
No response data
9.2.3.5. WRITE_PROTECTION (*)
To write the protection bits for the specified addresses in the card.
Each of the bytes specified in the command is internally in the card compared with the byte stored at
the specified address and if the data match, the corresponding protection bit is irreversibly
programmed to '0'.