Read-write system design of RF card based on MF-RC500 and MSP430f1232 (2)
source: China card network Author: Liu Jiancheng, Zou Yongzhuo, Zeng Guangxin, Feng Wei time: 2012-04-18
-
send, MF-RC500 provides energy carrier 13.56 MHz through TX1 and TX2, according to the register set modulation for the data to be transmitted on the parallel transmission signal is obtained; when receiving antenna, signal picked up by the antenna matching circuit to the RX pin, the MF-RC500 internal receiver detection and demodulation of the signal and processed according to the the register set, and then send the data to the parallel interface, read by the microcontroller.
Is in resonance frequency and quality factor of the eigenvalues of
inductively coupled antenna. High quality factor value will increase the strength of the current in the coil of the antenna, thereby improving the transmission of power RF card; and the transmission bandwidth of antenna coincides with the quality factor value is inversely proportional to change, quality factor selection would lead to high bandwidth reduced, thus significantly weaken the modulation cards received side, so the best quality factor the system is about 30, the maximum not more than 60. The quality factor can be calculated by the formula (1):
2 control program design of
the software part of the function is to control the MF-RC500 to send out signals, detect has been defined to control MF-RC500 chip type card verification card and read or write information on the card, will need to save data to the data and status and display the data in the memory 25AA320A, at the same time have the ability to communicate with the PC machine.
the software part including the initialization procedure, the RF processor, memory processing program, display driver module and RS485 serial processing procedure, this paper introduces the MF-RC500 initialization and RF card processing part of the program.
2.1 MF-RC500 initialization procedure
The internal registers
RF chip MF-RC500 page allocation, consists of 8 pages, each page has 8 registers, the first register page called page register, the register is used to select the page, the microcontroller can through internal register read and write to control system operation; internal EEPROM a total of 32 pieces, each 16 bytes 3, block to block 7 is used for storing the register initialization file. The initialization of MF-RC500 is the presence of 3 to 7 blocks of data to the corresponding EEPROM block register to achieve, mainly through the following functions:
Char MC500PcdReset (void); / / MF-RC500
Reset
Char MC500PcdConfig (void); / / MF-RC500
configuration register
Void MC500PcdSetTm (unsigned char tmLength); / / set the timing time of