Design of RF card reader based on TRF7960 chip

Publisher:少年不识愁滋味Latest update time:2011-04-15 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
At present, there are two ISO standards in the field of 13.56 MHz wireless radio frequency identification technology in my country, one is ISO14443 and the other is ISO15693. ISO14443 defines two types of protocols, TYPE A and TYPE B, with a communication rate of 106 kb/s. The difference between them lies mainly in the modulation depth of the carrier and the bit encoding method. ISO15693 has a longer reading and writing distance, while ISO14443 has a slightly shorter reading and writing distance, but the latter is more widely used. Cards with these three protocols are widely used in various fields, while the existing 13.56 MHz radio frequency card readers in China generally only support one protocol and have relatively simple functions. Based on this situation, this paper proposes a design scheme for a multi-protocol radio frequency card reader based on TI's TRF7960 radio frequency chip and Hongjing's STCllF32XE high-speed single-chip microcomputer. The card reader is expanded with peripheral devices such as dot matrix graphic LCD, serial memory W25X80, and USB chip PL2303. LCD can display various graphics and Chinese characters, serial memory is used to store dot matrix font library, graphic library, etc. USB chip makes the card reader save serial port and power supply port, and can communicate with PC management software through the USB interface. The card reader is easy to use, simple, low cost, stable circuit operation, and can be applied to various occasions.

1. Hardware Design of Card Reader

The STCllF32XE microcontroller is a single clock/machine cycle (IT) microcontroller designed and produced by Hongjing Technology Co., Ltd. It is a new generation of 8051 microcontroller with high speed, low power consumption and super anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8 to 12 times faster. It has an internal integrated high-reliability reset circuit and can be used in high-speed communication, intelligent control, strong interference and other occasions. The STCllF32XE has 32 KB of Flash, 29 KB of EEPROM and 1 280 bytes of SRAM. The STCllF32XE used in this article is an LQFP-44 pin. In addition to the EA, ALE, PSEN and RST pins that can be defined as general I/O, there is also an additional P4 port. The programming supports ISP download function, which is convenient to use.

TRF7960 is one of the high-frequency (13.56MHz) multi-standard radio frequency identification (RFID) reader IC product series launched by TI (Texas Instruments). TRF7960 adopts the advanced package design of ultra-small 32-pin QFN, supporting ISO/IEC 14443A/B, ISO/IEC 15693, ISO/IEC 18000-3 and TI's contactless payment business and Tag-It transponder product series. The card reader using TRF7960 provides an internal clock for the microcontroller, and only needs a 13.56 MHz crystal oscillator to work, instead of two standard crystals, which helps to reduce the total bill of materials cost of the terminal card reader product. Due to the small number of components, the card reader IC consumes little power and occupies little space, so sensitivity and noise attenuation problems can be solved. Other integrated functions include fault checking, data formatting, framing, and anti-collision support suitable for multi-card reader environments. The communication between TRF7960 and the microcontroller can use flexible communication methods such as 8-bit parallel or serial (SPI). The chip also has a wide operating voltage range (2.7 to 5.5 V). The TRF7960 is ideal for applications such as secure access control, product authentication, and contactless payment systems.

In order to use the 1 KB extended SRAM inside the STCllF32XE microcontroller, an 8-bit parallel analog bus interface is used here. The P1 port of the microcontroller is connected to the DO~D7 of the TRF7960, and P2.6, P2.7, and P3.2 are used as control lines to connect to the DATA CLK, EN, and IRQ pins of the TRF7960 respectively. It should be noted that in order for the TRF7960 communication interface to support a 5 V logic level, the VDD_I/O pin of the TRF7960 should be connected to a 5 V voltage. Using an analog bus is a common method, especially for microcontrollers that do not support bus expansion. The use of an analog bus in this design can prevent bus conflicts between the TRF7960 and the SRAM inside the microcontroller. Figure 1 is a system hardware schematic diagram of the card reader.


PL2303 is a USB bus adapter chip produced by Prolific: It can realize USB to serial port conversion and is used to expand asynchronous serial ports for computers, or directly upgrade ordinary serial port devices to USB bus. PL2303 is fully compatible with USBl.1 and USB2.0; 3~5 V regulated output can meet different voltage output interfaces; full-duplex transmission and reception (RXD, TXD); MODEM control lines (RTS, CTS, DTR, DSR, DCD and RI); 5, 6, 7 or 8-bit data format; parity or no parity; 1 bit, 1.5 bit or 2 bits of stop bits; programmable baud rate 75 b/s~6 Mb/s, etc. Therefore, PL2303 is an ideal choice for mobile systems and embedded systems, and its small package can be embedded in any connector and handheld device. PL2303 has very low power consumption in both working mode and sleep mode, which is very suitable for bus-powered applications. The USB chip enables the card reader to eliminate the serial port and power supply port, and can communicate with PC management software through the USB interface.

The display screen uses a graphic dot matrix LCD module based on the ST7565S controller with a resolution of 128×64, supports serial interface, and does not have a Chinese character library. In order to enable the card reader to be used in library book management and other occasions that require Chinese character display, the serial memory W25X80 produced by Winbond is used to design the GB2312 Chinese character library and other picture libraries. Serial Flash memory is popular for its small size, high density, low power consumption, low price and simple operation. The Flash memory W25X80 produced by Winbond is an 8 Mb serial Flash with a size of 1 MB, divided into 4096 pages, each page is a 256-byte storage unit, and has a 256-byte buffer and an SPI interface. Using Flash to design a Chinese character library is not only very simple to operate, but also can be flexibly applied to multiple design schemes.

The following points should be noted in the system hardware circuit design:

① Try to keep the filter capacitor close to the chip, especially the 10 nF capacitor, so as to effectively filter the high-frequency signal;

②Try to reduce the wiring ground loop, so the grounding vias are required to be as close to the grounding terminal of the components or IC as possible;

③ The two inductors should be placed at 90°, which mainly reduces the coupling between the two inductors;

④The digital ground and analog ground are preferably in different places, preferably connected through magnetic beads or inductors;

⑤ Ensure that the middle part of the chip is sufficiently grounded. You can drill 9 holes on the circuit board to allow the chip to be fully grounded and dissipate heat;

⑥ When wiring, try to reduce the length of auxiliary lines, especially the RF front end, so that the components can be kept compact and the RF output front end can maintain smooth output;

⑦ It is best to add some test points in the circuit to facilitate the adjustment of the hardware circuit;

⑧Try to avoid passing digital signals through RF lines.

2 Card Reader Software Design

After designing the hardware platform, it is necessary to design the system software module. In the software module design, the analog communication between the STCllF32XE microcontroller and the TRF7960 is the most critical step, because only by opening up the key link of the underlying communication can the STCllF32XE further realize the basic operation of reading/writing the card by controlling the TRF7960. In order to achieve this step, we must first figure out the read and write timing of the TRF7960.

The starting condition is that CLK is high, then the 8-bit address is sent first, and then the data is sent. The sending format is sent on the falling edge of the clock. When CLK is high, there is a falling edge on the A/D, indicating the end. According to the timing diagram, the C language implementation code for the STCllF32XE microcontroller to read/write 1 byte from the TRF7960 can be written:

The STCllF32XE microcontroller mainly implements complex read/write control of TRF7960 by calling these two most basic functions. The biggest advantage of using analog bus communication is that the code written in C language can be easily transplanted to various microcontrollers that do not support bus expansion, which increases the reusability and portability of software modules.

After the key links of the underlying communication are opened, each software module can be written and debugged step by step. Figure 3 is the software module flow of the card reader multi-protocol adaptive function.

3 Conclusion

This paper uses Hongjing's high-speed, low-cost single-chip microcomputer and TI's TRF7960 multi-protocol card reader chip and corresponding peripheral circuits to design a contactless radio frequency card reader. The design is based on ISO/IEC 14443A/B and ISO/IEC 15693 multi-protocol standards, and completes the system hardware circuit construction and system software design. Actual use has proved that the card reader has stable operation, strong anti-interference ability, high cost performance, flexible and convenient operation, and the product has strong market competitiveness. It will produce good economic benefits when put into use.

Reference address:Design of RF card reader based on TRF7960 chip

Previous article:Design of Streaming Media System Based on CDMA2000 1X
Next article:Current status and development of CMMB, the industry standard for mobile multimedia broadcasting

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号