PDA

View Full Version : Rfid Reader



thaivu
- 8th March 2006, 20:30
Hi,
I bought Parallax RFID reader and having problem to convert BS1 codes to Picbasic. I am using 16F84A/ 4Mhz . the codes is in this site:
http://info.hobbyengineering.com/specs/PARALLAX-RFIDReader1.pdf
I think the main problem is how to convert SERIN from BS1 to Picbasic.
The BS1 code:
SERIN Rx, T2400,($0A)
SERIN Rx, T2400, tag0, tag1, tag2, tag3, tag4
SERIN RX, T2400, tag5, tag6, tag7, tag8, tag9
My Picbasic code:
SERIN Rx, N2400,($0A)
SERIN Rx, N2400, tag0, tag1, tag2, tag3, tag4
SERIN RX, N2400, tag5, tag6, tag7, tag8, tag9
My picbasic code failed to find the header ($0A).
I would appreciate your help. Thank you

DynamoBen
- 9th March 2006, 01:43
The BS1 code:
SERIN Rx, T2400,($0A)
SERIN Rx, T2400, tag0, tag1, tag2, tag3, tag4
SERIN RX, T2400, tag5, tag6, tag7, tag8, tag9

I read through the datasheet and here is how I would do it in PICBasic:

tag var BYTE[10] ' Creates a byte array of 10 bytes

SERIN Rx, N2400,[WAIT ($0A),STR tag\10\$0D]

The above will wait for $0A then recieve either 10 bytes of data or stop once it recieves $0D, which ever comes first.

This should work great and same you tons of code space. Enjoy.

languer
- 9th March 2006, 02:00
Why don't you try changing the N2400 baud to T2400. BS1 does not have level shifter so these should match (plus the RFID says it will output to any TTL-compatible UART).

So the PB code would be:

SERIN Rx, T2400,($0A)
SERIN Rx, T2400, tag0, tag1, tag2, tag3, tag4
SERIN RX, T2400, tag5, tag6, tag7, tag8, tag9

DynamoBen
- 9th March 2006, 02:29
Opps sorry missed that part of it. If you use both suggestions you should be all set.

thaivu
- 9th March 2006, 17:40
Dear DynamoBen and Languer,
I am so happy to hear from you, I am out of town now and will try it and let you know. I have been thinking about building some rfid door locks for my apartement complex . It will save me a lot time and $ if this project turn out to be good.
Thank you very much.
Thai Vu

sakthi
- 9th November 2006, 07:52
hi,
i m doing project in rfid.i need the details abt the power source for that rfid reader,i m using 125khz reader.if any one knows plz help and provide some details abt the power supply circiut.
sakthi