Memory card – sle 4406/sle 4436/sle 5536/sle 6636, Read_memory_card, Write_one_byte_memory_card – ACS ACR38 SAM Smart Card Reader User Manual

Page 36

Advertising
background image

ACR38x – Reference Manual

[email protected]

Version 6.02

www.acs.com.hk

Page 36 of 40

9.2.2.7. Memory Card – SLE 4406/SLE 4436/SLE 5536/SLE 6636

9.2.2.7.1. READ_MEMORY_CARD

Send Buffer Format

SCardTransmit Send Buffer

CLA

INS

P1

Byte Address (P2) MEM_L (P3)

FFh

B0h

00h

Where:

Byte Address = Memory address location of the memory card.
MEM_L

Length of data to be read from the memory card.


Response Buffer Format

SCardTransmit Receive Buffer

BYTE 1 … … BYTE N SW1 SW2

Where:

BYTE x

Data read from memory card.

SW1 SW2 = 90 00h if no error.

9.2.2.7.2. WRITE_ONE_BYTE_MEMORY_CARD

This command is used to write one byte to the specific address of the inserted card. The byte is

written to the card with LSB first, i.e. the bit at card address 0 is regarded as the LSB of byte 0.
Four different WRITE modes are available for this card type, which are distinguished by a flag in the

command data field:

a. Write
The byte value specified in the command is written to the specified address. This command can

be used for writing personalization data and counter values to the card.
b. Write with carry
The byte value specified in the command is written to the specified address and the command is

sent to the card to erase the next lower counter stage. This write mode can therefore only be

used for updating the counter value in the card.
c. Write with backup enabled (SLE 4436, SLE 5536 and SLE 6636 only)
The byte value specified in the command is written to the specified address. This command can

be used for writing personalization data and counter values to the card. Backup bit is enabled to

prevent data loss when card tearing occurs.
d. Write with carry and backup enabled (SLE 4436, SLE 5536 and SLE 6636 only)
The byte value specified in the command is written to the specified address and the command is

sent to the card to erase the next lower counter stage. This write mode can therefore only be

used for updating the counter value in the card. Backup bit is enabled to prevent data loss when

card tearing occurs.

With all write modes, the byte at the specified card address is not erased prior to the write operation

and, hence, memory bits can only be programmed from '1' to '0'.
The backup mode available in the SLE 4436 and SLE 5536 card can be enabled or disabled in the

Advertising