LPC2148 – RFID Interfacing

In this tutorial we are going to see RFID Interfacing with LPC2148. So in this tutorial we will use EM18 RFID Reader Module. Because it will give the data via serial communication. Before interfacing please have a look at How Does RFID Works?

Suggest to Read

Why EM18?

EM-18 RFID reader is one of the commonly used RFID reader to read 125KHz tags. It features low cost, low power consumption, small form factor and easy to use. It provides both UART and Wiegand26 output formats. It can be directly interfaced with microcontrollers using UART and with PC using an RS232 converter. Just power the module, and it will read any RFID card within range.
It will output the cards ID in a serial string, which can easily be read by any microcontroller. The spacing on the pins is 2.54 mm, which means the module will directly fit on a breadboard.

Features

  • 5V supply
  • 125kHz read frequency
  • EM4001 64-bit RFID tag compatible
  • 9600bps TTL and RS232 output
  • Magnetic stripe emulation output
  • 100mm read range

RFID Interfacing With LPC2148

Component Required

  • EM18 Module
  • LCD Module
  • LPC2148 Development Board

Circuit Diagram

The full circuit diagram for interfacing RFID module to LPC2148 is shown below. The unique ID code in the RFID card is read by the circuit and displayed on the 16×2 LCD display.
LCD:

RS – P1.16
RW – P1.17
EN – P1.18
Data Lines – P1.24 – P1.31

EM18 (RFID Reader):

RFID Reader TX – P0.1

lpc2148 rfid interfacing

Programming

Programming Steps

  • Initialize the LCD
  • Initialize the Serial Communication (9600 BaudRate)
  • Receive the 12 bytes and display it into the LCD Display

In this tutorial I’ve displayed the 12 bytes id. But you can play with that bytes. For example, You can verify the number. If it is matching you can run the motor.

Code

In this code i’m reading the unique id number using polling method and printing that to LCD. You can also try using serial interrupt. You can download the project here.

You can try this code with hardware. If you have any doubt please ask us.

0 0 vote
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: