Help with RFID reader from Parallax

Photo-Worx

New Member
Well, I gave in and bought a Parallax RFID reader from Radio Shack yesterday. It's a great "toy", but I haven't gotten it to work with the picaxe properly yet.
The program I wrote reads the ID tag, but it won't successfully compare what it reads to what is stored in the picaxe.

I have attaached the .bas file for you to check out.

If anyone has any ideas, Please jump in.

Thanx a bunch.
 

Attachments

SD2100

New Member
For starters you do the first compare using READTABLE then for all the others you are just doing a READ.
 
Last edited:

Photo-Worx

New Member
Thanx Phil. I didn't even realize that I didn't change them all. :eek:
I'll make the change and see what it does.

EDIT

O.K. I made the change and it still will not validate the tag. I am reposting the file.

Thanx again.

EDIT

It seems that it goes as far as the second compare and hangs up on the "f".
Can the picaxe only compare numbers?????
 

Attachments

Last edited:

Technical

Technical Support
Staff member
letters should be fine, but f and F are two different ASCII numbers for this type of comparison - so try F instead.

Also your good/bad routines contain for-next loops without any commands inside - these will process very quickly and be hard to see.
 

SD2100

New Member
It all depends what data you have coming in via serial, you can get it to simulate through all the compare steps by putting the "0f03028488" into the serin data box, I found you have to put an extra character at the start "00f03028488" otherwise the serial input box comes up with an insufficient data error because you are only entering 10 bytes and you have 11 variables in the serin command.

With your empty for/next delay loops you can use a PAUSE or WAIT there instead also in your "good tag" bit the FOR b12 = 1 to 500 will never end because b12 is only byte size and can only count to 255, it then rolls over back to 0. You would have to change it to a word size variable or just use a PAUSE or WAIT instead.

I looked at the data sheet, I think it's what you have ???
The reader is sending a 12 byte string, the start byte is 0x0A and the end byte is 0x0D (line feed and carriage return) you should be checking these for a valid transmission, the ten middle bytes are the tags Id.
 
Last edited:

Photo-Worx

New Member
Success!!!!

Thanx a million to Technical.......
It was the F that made the difference. It all works now. :D

Now I just need to figure out how to get it to look up through more than one tag.... :confused:

Thanx again everyone.
 
Top