N and V column
Column #120: You Can’t Touch That: Non-contact Access Control
Page 72 • The Nuts and Volts of BASIC Stamps (Volume 6)
Show_Name:
DEBUG DEC tagNum, ": "
LOOKUP tagNum,
[Name0, Name1, Name2, Name3], idx
DO
READ idx, char
IF (char = 0) THEN EXIT
DEBUG char
idx = idx + 1
LOOP
RETURN
The result of the tag search (in the variable tagNum) will be from one to the number of known
tags if the tag string is valid – if not, the search will result in zero. The Show_Name routine
uses the result of the tag search to LOOKUP the first character of the corresponding name.
After that, each character is printed in a loop until the zero terminator is encountered. We
could very easily change the DEBUG line to SEROUT for a serial LCD, or to LCDOUT if
we're using a BS2p or BS2pe and have a parallel LCD connected as required.
Well, that's it. That was pretty simple, wasn't it? I think so, and I'm having a lot of fun with
the RFID reader. Be sure to check out the web resources listed, there's lots of interesting
information on RFID technology, and Joe Grand's web site has some really cool stuff (if
you're into hardware hacking, you'll love his books).
Until next time ... Happy Stamping!
Web Resources
www.parallax.com
www.grandideastudio.com
www.rfidjournal.com
www.emmicroelectronic.com
www.sokymat.com