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