Location: HomeNews Technical News

Introduction to CPU Card Knowledge Tutorial - Chapter 4: File Structure of CPU Cards 1

2023-08-25 10:55:52

As a carrier of information, CPU cards must be able to store information, such as storing a person's identity information on the CPU card (including name, age, workplace, position, phone number, etc.). How is this specific information stored on the CPU card?

Please listen to me explain in detail.

At this point, we can imagine a CPU card as a floppy disk, but the capacity of a floppy disk is much larger than that of a CPU card. Currently, the capacity of a floppy disk is generally 1.4M bytes, while the commonly used CPU card has a capacity of only 8K or 16K bytes, which is much smaller than the capacity of a floppy disk. Of course, the larger the capacity of the CPU card, the more expensive it is.

Please take a look at the following example

Assuming we store the identity information of a person mentioned above in pm.txt.

How to store pm.txt on a floppy disk

Method 1: A: \ pm.txt

Method 2: A: \ adf1 \ pm.txt

Method 3: A: \ ddf1 \ adf1 \ pm.txt

The above is the way information is stored on a floppy disk.

Please take a look at the example of the logical file organization structure within the CPU card specified in ISO7816-4, as shown in the following figure:

You can see that there are only three levels of directories at most. This is because in practical applications, only three layers of directories are sufficient.

So nowadays, CPU cards generally only support up to three layers of directories, and some foreign cards only support two layers of directories (in fact, two layers of directories are usually sufficient).

Please take a look at the following example (which can be compared to floppy disks)

Assuming we store the identity information of a person mentioned above in EF1.

CPU card

Due to the fact that the file operating system of the CPU card is much simpler than the DOS or WINDOWS operating system, to put it bluntly, it can be said that "little tricks see big tricks". However, this can be understood, as it is currently not possible to implement a powerful operating system like DOS or Windows on such a small chip.

So the regulations for files, as well as the creation and operation of files, are quite cumbersome.

The difference lies in:

1. When a CPU card creates a file, it must first declare the type of file being created and the size of the file's space.

On a floppy or hard drive, the file length can be left unspecified.

2. After the CPU card has created a file, it cannot be deleted. (Exceptions can be made when testing card issuance, but MF is deleted, which means deleting all files and directories in the card.)

3. There are only a few types of CPU card files without a suffix.

4. The creation and writing of files on the CPU card must be done by sending APDU messages to the card, and the number of bytes written each time cannot exceed 256 bytes, which is quite troublesome.

About FONGWAH
FONGWAH Technology is a high-tech enterprise that specializes in research, development, production, and operation of intelligent IC cards, embedded IC card modules, desktop IC card readers, and related IC card reading and writing devices
Last News

Related products

Page

Hot News