Continue to Site

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.

Issue with RFID data Read & Compare it with Stored one in EEPROM

Status
Not open for further replies.

neeteen09

Newbie level 5
Joined
Nov 25, 2016
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
94
Hi everyone.

I m doing RFID based Vehicle Parking system using AT89S52.

I have to detect RFID card using serial interface. RFID unique code will be received via serial interface.

But I don't know how data will be received in microcontroller? (Byte by byte in array?)

Also how should I store its unique ID in EEPROM ? whether byte by byte in array or 4 byte data?
How to validate it with stored unique ID?

Thanks In Advance.
 

Being serial the bytes will arrive one at a time. You can compare the first byte with the one in the EEPROM then move on to the second and so on but it is generally easier to store them all in an array and compare them all at once.

As you are using an 8-bit processor, storing them as an array of bytes (chars) is the best strategy.

Brian.
 

Code:
typedef struct {uint16_t ID, uint8_t SN[4]} RFID_UserTypeDef;
RFID_UserTypeDef RFID_Users[MAX_USERS]
 

Hi,

I have to detect RFID card using serial interface
But I don't know how data will be received in microcontroller?
There are a lot of serial devices.
The first you have to decide how to conne t the reader to your microcontroller - which serial interface to use.
Then read the microcontroller's datasheet section of the selected serial interface.

(Byte by byte in array?)
The mirocontroller for sure will receive byte by byte... I can't think of another way.
But how you store and process the data is a question of software ... your programming skills and your programming style.

But maybe programming is one of the last steps you have to do..

It seems you are not very experienced with writing software.
Did you do the homework first? --> Do first things first, if you don't want to fail.
* An overview about the hardware you need
* An overview about the software functions you need
* A flow chart of your software
* did you consider unwated situations: misuse of RFID cards, power fail during EEPROM write, EEPROM wear out, corruption
* Calculations about the resources you need (RAM, EEPROM, periferals/interfaces, power supply, back up power supply...)

Calculation about the EEPROM size you need?
* How many bytes for one RFID card?
* do you need to store additional informations? Date/time of arrival, valid/invalid, payment...
* how many of these datasets need to be stored?
* (how long) do you need to keep the data? Can you delete them after the car leaves the parking?
* and so on..

Klaus
 

I would recommend you to take it step by step. No one will give you complete solution. I think you should first start with RFID interfacing with your microcontroller. You will get data in char form on serial port. Like if you cards number is "123N45" something then you will get each character one by one. You should reply to KlausST questions too :p
 

I would recommend something even more basic... start with a specification.

We don't know if you are expecting just one RFID device or thousands. If only one, a byte by byte check is easiest. If there are more devices and you want to see if the one reporting is part of a list in EEPROM, the method described by Easyrider83 is optimal, create a structure to hold the data then declare multiple instances of it, as many as there are in the EEPROM list.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top