Interfacing RFID with 8051 microcontroller (AT89C51) using serial interrupt
Summary
This topic covers the interfacing of RFID system with microcontroller through serial interrupt. An RFID system consists of a reader device and a transponder. A transponder or tag has a unique serial number which is identified by the reader. RFID tag is applied to products, individuals or animals to identify and track them through this number.
Description
This topic covers the interfacing of RFID system with microcontroller through serial interrupt. An RFID system consists of a reader device and a
transponder. A transponder or tag has a unique serial number which is identified by the reader. RFID tag is applied to products, individuals or animals to identify and track them through this number.
The interfacing has been done through AT89C51. The identification code of the tag is also displayed on a 16x2 LCD. The free source code for the program is available in C.
The RFID system interfaced with AT89C51 requires the controller to continuously scan the input from the RFID reader. In this topic, the program has been made more efficient by incorporating a serial interrupt.
Different RFID tags work on different frequencies. Here low frequency, 125 kHz, RFID tags have been used. These tags work within a range of 10 cm. When an RFID tag comes in this range, the reader detects it and sends a unique code of the tag serially. This serial code, consisting of 12 bytes, is received by the microcontroller.
In the program, Timer1 is configured for serial communication. (Refer Timer programming in 8051) The baud rate is set to 9600bps for data transmission. The LCD is initialized to display the code. When a card/tag comes in the proximity of RFID reader, the microcontroller reads the code and sends it to the LCD module.
The RFID system interfaced with AT89C51 requires the controller to continuously scan the input from the RFID reader. In this topic, the program has been made more efficient by incorporating a serial interrupt.
Different RFID tags work on different frequencies. Here low frequency, 125 kHz, RFID tags have been used. These tags work within a range of 10 cm. When an RFID tag comes in this range, the reader detects it and sends a unique code of the tag serially. This serial code, consisting of 12 bytes, is received by the microcontroller.
In the program, Timer1 is configured for serial communication. (Refer Timer programming in 8051) The baud rate is set to 9600bps for data transmission. The LCD is initialized to display the code. When a card/tag comes in the proximity of RFID reader, the microcontroller reads the code and sends it to the LCD module.
The serial interrupt is triggered on every reception of one byte of data. Since the identification code of transponder consists of 12 bytes, the flag is also generated 12 times to indicate the byte wise transfer of data. Whenever the serial code is generated by the reader, the interrupt is activated and the data is sent to the receiver pin of microcontroller.
A serial level converter is required for AT89C51 to receive these serial signals. IC MAX232 has been used for this purpose to interface the RFID reader with microcontroller. The circuit connections are as follows:
Receiver1 (R1) of MAX232 has been used for the serial communication. The receiver pin of RFID reader is connected to R1IN (pin13) of MAX232. R1OUT (pin 12) of MAX232 is connected to RxD (P3.0) of microcontroller.
RFID Reader | MAX232 | AT89C51 | |
Rx | R1 IN | R1 OUT | Rx |
Video
Code
This Code is only visible to Registered users. Please Login/Register
Components
|
MAX232 The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of microcontrollers with PC. The controller operates at TTL logic level (0-5V) whereas the serial communication in PC works... |
|
AT89C51 Microcontroller AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (... |
|
LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments... |
- 17643 reads
