help for reading from RFID
Discussion in "Project Help" started by vinay melgiri Apr 22, 2009.
Wed Apr 22 2009, 05:46 pm
hi,
i m doing a project using rfid reader. i interfaced it successfully to PC but wen i interface it to my micro controller its not working. i verified the code by checking with pc's terminal software and it works fine there. so please can u help me...
i m doing a project using rfid reader. i interfaced it successfully to PC but wen i interface it to my micro controller its not working. i verified the code by checking with pc's terminal software and it works fine there. so please can u help me...
Thu Apr 23 2009, 08:06 am
#include<p89v51rx2.h>
#define Baud_rate 0xFD // BAUD RATE 9600
void main()
{
TMOD = 0x20;
SCON = 0x50;
TH1 = Baud_rate;
TR1 = 1;
while(1)
{
while(RI == 0);
P0=SBUF;
RI = 0;
}
}
#define Baud_rate 0xFD // BAUD RATE 9600
void main()
{
TMOD = 0x20;
SCON = 0x50;
TH1 = Baud_rate;
TR1 = 1;
while(1)
{
while(RI == 0);
P0=SBUF;
RI = 0;
}
}
Thu Apr 23 2009, 08:08 am
i have written program to just read one byte from reader. i have connected leds to P0 to check output. the first byte shold be 03h but i m getting FFh
Thu Apr 23 2009, 05:06 pm
i don have the circuit diagram as such. its just a simple interface of rfid scanner (MODULE DT125R Series by Digant Technologies) and microcontroller (p89v51rd2)
Fri Apr 24 2009, 02:21 am
what commands are you sending to module.. coz module will only read if you send read command. read the datasheet carefully.
Fri Apr 24 2009, 08:35 am
there is no need to send commands to read data. if we swipe card its enough. i have checked the reader output on CRO
Sat Apr 25 2009, 12:17 am
CRO or hyperterminal? better test on hyperterminal.
do check baudrate.. and review your code..
do check baudrate.. and review your code..
Powered by e107 Forum System