Page 1 of 1

PIC <p18f4520> cant receive data from RFID Reader <RFID-IDR>

PostPosted: Tue Mar 08, 2011 4:57 pm
by yplee
Hi all;

Basically, I am having a problem on interfacing RFID card reader (RFID-IDR-232N) on my PIC (p18f4520). I have use the TX-pin of RFID connected to my PIC. Since RFID output voltage is -10/10V I have used the converter which stated on PV8 schematic diagram by 2N2222 transistor, 1N4108 diode, 2 x 10K resistor, and 1K resistor. However, my PIC still not able to receive the data from RFID reader. I have tried use MAX232 too w, but still my PIC cant receive any data from my RFID card reader.

In my program, I write my code as below:
for(i=0;i<12;i++)
data[i]=uart_rec();

data[0] is start bit and data[11] is end bit...

However, when I do my comparison on my pic...i use from data[1] to data[10] to compare with my id_card number.

if (is correct) PORTB = 0b00001111; else PORTB = 0b11110000;

My PORTB keep set as 0b11110000 no matter how many time i swap my card on my RFID reader. Still I have no idea about this, Hope u all could help me about that..

Thank you,
yplee

Re: PIC <p18f4520> cant receive data from RFID Reader <RFID-

PostPosted: Tue Mar 08, 2011 5:16 pm
by shahrul
Why not you are display the data[1] to data[10] value. Don't need to compare and display another thing on PORTB.

Re: PIC <p18f4520> cant receive data from RFID Reader <RFID-

PostPosted: Sun Mar 13, 2011 1:01 pm
by yplee
problem solved...thank you =) it is hardware problem =)

Re: PIC <p18f4520> cant receive data from RFID Reader <RFID-

PostPosted: Sun Mar 13, 2011 2:22 pm
by robosang
yplee WROTE:problem solved...thank you =) it is hardware problem =)


What is the hardware problem? Share with us :D