The IC card (Integrated Circuit Card) is an integrated circuit chip embedded in a plastic substrate, packaged in the form of a card, with the ability to read and write data and store data. Contact IC card is one of the modern smart cards. It is a high-performance identification card that appears after bar code cards and magnetic cards. It is a product of high-tech comprehensive development of microelectronics, computer and electronic information. The IC card has a larger storage capacity than the magnetic card, and has high reliability and security. In addition to covering the entire application range of the magnetic card, the IC card also provides many application characteristics that the magnetic card does not have. It is these characteristics that make IC cards show unprecedented advantages in offline business processing and network data consistency. It has been widely used in many fields such as finance, transportation, communication, security, entertainment and so on.
1 AT24C08 card
A memory card is a type of IC card. It is an IC card with an electrically erasable programmable memory (E2PROM) as its core, which can be reused many times. AT24C08 is an I2C interface and a highly integrated serial E2PROM memory IC card produced by ATMEL. The AT24C08 features the following features: 400kHz I2C-bus compatible, low-power CMOS technology, 1000000 program/erase cycles, and data retention for more than 100 years.
The contact position and function of the AT24C08 chip conform to the ISO7816-2 standard. The contact position is shown in Figure 1. The contact function is shown in Table 1.
2 circuit design and read and write control
2.1 Interface circuit design
The single chip used in this design is AT89C51 [1]. The circuit connection between the AT24C08 deck and the AT89C51 is shown in Figure 2 [2]. The SLC is a serial clock. On the rising edge of the clock, data is written to the E2PROM; on the falling edge of the clock, data is read from the E2PROM. SDA is a bidirectional data port. It is an open-drain pin that satisfies the "wire-to-wire" condition. A pull-up resistor is required during use. SW1 and SW2 are one pair of normally open contacts of IC card holder, SW1 is connected with Vcc, and SW2 is connected with pin P1.0 of AT89C51. Usually, P1.0 is connected to ground through one resistor. When a card is inserted, SW1 and SW2 are shorted, and Vcc pulls P1.0 high. By checking the level on P1.0, you can know if there is any card insertion.
2.2 AT24C08 memory read and write operations
The data interface of the AT24C08 is fully compliant with the I2C standard. The I2C bus is a serial bus composed of a data line SDA and a clock line SCL, which can transmit and receive data. The I2C bus protocol specifies that data transfer is only allowed when the bus is idle. During data transfer, when the clock line is high, the data line must be stable and no transitions are allowed; any level change of the data line will be treated as a bus start or stop signal. The I2C bus has the following three types of signals in the process of transmitting data:
(1) Start signal: When SCL is at a high level, SDA transitions from high to low as the start signal of the I2C bus, and the startup state should be established before the operation command (read/write).
(2) Stop signal: When SCL is at a high level, the SDA transition from low to high acts as a stop signal for the I2C bus, indicating the end of an operation and immediately ending all relevant communications.
(3) Acknowledgement signal: After receiving 8 bits of data, the AT24C08 sends a low level to the AT89C51 at the 9th pulse, indicating that the data has been received. As shown in Figure 3 (a).
As can be seen from the timing diagram, the card must be initiated by the start signal, followed by the device address, allowing the card to read/write. For the AT24C08 card, the device address is 4 bits high and must be 1010. The lowest bit is used as the read/write control bit. "0" means to write to the IC card, and "1" means to read the IC card. The information is sent first, as shown in Figure 3(b).
Bakery Trolley,Mobile Bakery Food Trolley,Bakery Racking Trolley With Trays,Bakery Moving Service Trolley
Jiangmen Vanky Stainless Steel Products Co., Ltd. , https://www.vankystar.com