Design of Non-contact IC Card Control System Based on DSP

With the continuous development of radio frequency technology, the field of wireless communications has received more and more attention from people, and as a non-contact IC card in the field of wireless communications is already everywhere. For example, buses' bus cards, food cards in canteens, fitness cards in clubs, etc., cover almost every area of ​​our lives. In general, small-scale, mature non-contact IC card systems use single-chip microcomputer as the core processor and the transmission network is RS485/422 or CAN bus. This system structure has the advantages of powerful control, low price, easy development and design, etc. Therefore, it has become the preferred solution for various small-scale non-contact IC card systems.

However, due to the limitations of the operating speed, storage space, and instruction system of the SCM, if a single-chip microcomputer is used as the core processor in a large-scale non-contact IC card network system, the address waiting time and the amount of data storage will inevitably increase. Exceeds the system indicator range. The traditional solution is to increase the number of MCUs and classify the IC card information into corresponding MCUs. Although this can solve the above problems, it also brings disadvantages. On the one hand, this will increase the cost of the entire system. On the other hand, it will inevitably increase the complexity and uncertainty of the system, and cause inconvenience to users.

In view of the above situation, this
Paper proposes a design concept of non-contact IC card control system based on fast DSP chip. This system uses a DSP chip instead of multiple single-chip microcomputers as the core processor. It takes advantage of the DSP processing speed to optimize the overall system performance. At the same time, the price of a DSP in the South is also lower than the total number of multi-chip microcomputers, so the product cost of this system is also On the basis of this advantage, DSP chip processors can also store a large amount of IC card authority data.

1 system architecture

The overall design of the system is shown in Figure 1. This system forms a typical control network. When the reader MFRC2500 is within the magnetic field of the detection terminal, it will receive radio frequency pulses of external signals and receive RF pulses from the same time. The demodulated information is sent to the controller TMS320F2407. The controller TMS320F2407 reads and writes the card reader MFRC500. After receiving the information for analysis and processing, it will be transmitted via RS-485/422 in half (full) duplex communication mode. Signals are sent to the server to form a bus topology control network. During the working process of the system, the server monitors the status of the controller at any time, judges the working condition of the controller, and detects the status of the card reader. The server and the controller work in the master-slave mode. The control commands issued by the server and the response information returned by the controller are transmitted through the eight-core cable.

The Philips MFRC500 reader is a member of the highly integrated reader IC series for 13.56MHz contactless communication. This series of readers uses advanced modulation and demodulation concepts to fully integrate all types of passive contactless communication methods and protocols at 13.56 MHz, which is the core module for wireless communication in this system. The MFRC500 series modules support parts 1 to 4 of the SO14443 Type A protocol and the Mifare classic protocol. The internal transmitter part can directly drive near-operating distance antennas without the need for additional active circuits. It uses the CRYPO1 encryption algorithm and contains a secure non-volatile internal key. Memory. The chip has an integrated analog modulation and demodulation circuit, which requires a minimum number of peripheral circuits to work. It supports I2C interface, UART interface, and SPI interface. It is especially suitable for the application of the reader of the billing system or identification system of water, electricity, gas meters, vending machines, access control, elevators, drinking fountains, telephones, etc. in the ISO14443 standard.

2 hardware structure

The MFRC500's parallel interface can be connected to multiple microprocessors with different types of parallel interfaces. After each power-on reset, the MFRC500 will reset its parallel interface mode and pass the logic level of the corresponding pin to determine the current microprocessor. The interface type of the device realizes the synchronization with the microprocessor. This system uses a read/write gate separation and address/data bus multiplexing construction. The connection schematic is shown in Figure 2. It can be seen from Figure 2 that the system uses an interrupt mode of operation, that is, the TMS320F2407 controls it based on the interrupt information provided by the MFRC500. In addition, according to the actual situation, the system can also use non-contact IC chip query operation.

The address bus A2, A1 and A0 of MFRC500 is always 011; The reset footstep change from TMS320F2407 will reset MFRC500, DS foot of TMS320F2407 produces the chip selection signal NCS and foot respectively outputs read control signal NRD and write control signal NWR, A4 foot Generate the address latch signal ALE (the TMS320F2407 address and data lines are independent, there is no ALE address operation, in order to access the MFRC500, here through the I / O pin output programming to achieve), TMS320F2407 interrupt pin INT0 is directly connected to the interrupt pin of MFRC500. The interrupt output of MFRC500 will trigger TMS320F2407 to enter the corresponding interrupt service routine.

3 Software Design 3.1 Communication Protocol

The TMS320F2407 controller communicates with the system server in full/half-duplex mode. According to the RS-232/RS-485 specification for the format and level characteristics of a frame of data, various command and return status information constitute the communication protocol of the system. Considering the problems that the system will cause when it expands and integrates, try to standardize the communication protocol during design. In the software design of this system, the communication protocol uses the format of "header + address + command + data + check + end of frame".

3.2 Software Design

The main program of system software design includes: inquiry card operation program, communication interrupt processing program, read/write clock, card selection, card reading program, and communication procedure with the host computer. The process of the card operation is a very complicated program execution process. A series of registers in the MFRC500 are to be configured, and these operations are very strict in timing requirements. First, the system is initialized. If a card enters the RF area, the chip starts to read the card and compares the card information with the information stored in the chip to determine whether it is the corresponding card. If it is not a valid card, the program returns; if it is the corresponding card, it determines whether the card needs to be Password, if you do not need to input the password, read the card information directly. If the card information is consistent with the information in the host computer, execute the relevant instructions according to the program; if you need the password, wait for the password and read the card information. If you enter the password three times in succession All errors, the card is invalid, the main program returns. The main program flow chart shown in Figure 3.

4 System Performance Test Results Evaluation

After theoretical calculation and actual prototype verification, based on the TMS320F2407-based non-contact IC card system, compared to the microcontroller-based system generally has the following advantages:

(1) The amount of system memory is large. The data of TMS320F2407 adopts 16-bit mode. Compared with the traditional 8-bit single-chip microcomputer, the data is twice that of the same chip selection, and the 12 I/O digital pins of TMS320F2407 After configuration, it can be used as the chip select signal for the address. It is based on the special TMS320F2407 storage structure and a wealth of pin resources, making it much larger than the storage system with the microcontroller core system, fully meet the application of large-capacity card data applications.

(2) Processing speed. The system crystal oscillator is 10MHz. After being divided by two, it is 20MHz. After calculation and actual verification, the program finds the card time after operation is about 0.0042s. The MFRC500 format transmission specification will not exceed 0. 2s, so when the system timer sets a timing constant of 0.3, it can be concluded that the system can hold about 1 million cards.

5 Conclusion

This article mainly introduces a non-contact IC card control system based on DSP, and gives the corresponding hardware and software design. This system has strong versatility and wide application. It involves applications in various fields and can be modified in this framework according to actual conditions. Compared with the non-contact IC card control system whose core is single-chip microcomputer, it has the advantages of large storage capacity, fast processing speed and low system cost, and is suitable for large-scale application occasions. The actual use of the proof, the system is stable, real-time, good anti-interference ability, cost-effective, flexible and convenient operation, if put into use will produce better economic benefits.

Speciality Chemicals

Fine Specialty Chemicals, Textile Chemicals, Speciality Chemicals

Dynasty Chemicals (NingBo) Co., Ltd. , http://www.dychemco.com