Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing RFID reader to FPGA

Status
Not open for further replies.

ashita_93

Newbie level 3
Joined
Apr 5, 2015
Messages
4
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
32
Hi
My project is Automatic Garage door control using RFID on FPGA. When the RFID tag ID attached to a vehicle is matched the garage door opens. Also i will be using IR sensor modules to close the door once the car is parked.
RFID reader has both TTL and RS232 output and IR sensor has TTL output. I am using Xilinx Spartan 2 xcs200 pq208 kit. The RFID reader send data at 9600 bps , 8 data bits , 1 start and stop bit. Can anyone please suggest me a UART receiver code that i can use to read he tag data.
It will be very helpful for me.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,299
Helped
14,233
Reputation
28,727
Reaction score
12,925
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,668
Looks like a typical - in in a bad sense - academic project. Obviously the problem can be easier and cheaper solved with a small microprocessor. And it's not asking for any FPGA specific features like fast logic or numerical processing.

But of course in can be solved with FPGA, too. For the UART receiver, you may search the forum for "VHDL UART" or "Verilog UART".

Here's a simple example from a previous thread. https://www.edaboard.com/threads/314515/#post1346831
 

ashita_93

Newbie level 3
Joined
Apr 5, 2015
Messages
4
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
32
Sir, are you trying to say it's harder to implement on FPGA ? i know i it can be easily done on a microprocessor. but i want to try it on a FPGA. Going through the link u sent RFID reader gives me this data format
RS232 interface format:
10 ASCII DATA (card no.)+ 2 ASCII DATA (XOR result)
1.data baud rate:9600BPS 2.data bit:8bits 3.Parity check:none
4.stop bit:1
But the code output's oly 8 bit output. It's a little confusing. Can u explain that
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,299
Helped
14,233
Reputation
28,727
Reaction score
12,925
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,668
The format specification isn't completelöy clear "ASCII data" can mean e.g. decimal or hexadecimal coding.

In any case you receive a number of characters that has to be processed sequentially in a state machine.
 

ashita_93

Newbie level 3
Joined
Apr 5, 2015
Messages
4
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
32
It is hexadecimal eg tag number is 190C6A453090 (12 characters) ...
So the code you wrote would read just one character say "1" by transmiting a start bit(low), 8 bit data , and a stop bit(high) just to transmit a single character.To read a series of characters i have to repeat the same steps 12 times ....each times storing the character received in a register. Compare it to see if it the tag i wish to match. Am i right?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,299
Helped
14,233
Reputation
28,727
Reaction score
12,925
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,668
To read a series of characters i have to repeat the same steps 12 times ....each times storing the character received in a register. Compare it to see if it the tag i wish to match. Am i right?
Yes. The VHDL code is an UART component, similar to the UART available in a usual microcontroller.

- - - Updated - - -

You'll design a sequential circuit (state machine) that receives the individual characters of an ID telegram and compares it with the expected ID.
 

ashita_93

Newbie level 3
Joined
Apr 5, 2015
Messages
4
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
32
So i have to connect the RFD reader to the serial port on the FPGA. Write the code only for VHDL/Verilog UART receiver since the reader is the transmitter.Dump it onto the chip. Do i check the output on LED's? Is it gonna show all the 8 bit data pattern for each character one at a time?
 

annna

Member level 2
Joined
Jun 17, 2010
Messages
52
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
pak
Activity points
1,682
Which RFID reader are you using? I am looking for a cheap RFID tag reader that works at least for 1 meter range. Can anyone suggest any modules??

Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top