N and V column

Column #120: You Can’t Touch That: Non-contact Access Control
The Nuts and Volts of BASIC Stamps (Volume 6) Page 69
The latch is activated (to allow entry) and then a beep is played through piezo speaker of
amplifier circuit to alert the user. The beep stops after about two seconds and the door
relocks. With that we go back to the top of the program.
When the tag presented does not match any of our table entries a one-second groan is played
through the speaker:
Bad_Tag:
DEBUG "Unknown Tag", CR
SOUND Spkr, (25, 80)
PAUSE 1000
GOTO Main
And that's that. As I told you, it's really very simple – the trickiest part about this program is
working around the behaviors of the BS1; but even that wasn't so bad. Okay, let's port this
baby to the BS2.
Starting back at the tags table, we're going to add names to each tag. In our demo program
we'll just send these to the Debug Terminal window, but we could just as easily put them on
an LCD if we ever decide to add one to the project.
Tag1 DATA "0F0184F20B"
Tag2 DATA "0F01D9D263"
Tag3 DATA "04129C1B43"
Name0 DATA "Unauthorized", CR, 0
Name1 DATA "George W. Bush", CR, 0
Name2 DATA "Dick Cheney", CR, 0
Name3 DATA "Condoleeza Rice", CR, 0
Note that the name strings are zero-terminated so that we're not restricted to a specific length.
We'll get to the printing routine later.
Did you read last month's column? If not, why not?! Okay, I'll put my bruised ego aside and
just point out that we're going to take advantage of the lessons on conditional compilation in
this program. When I stated above that we would port the program to the BS2, I meant the
BS2 family; the entire BS2 family.
The first thing to consider is the RAM required to read the RFID tag string: 10 bytes. This is
usually temporary in nature and it would really be nice if we didn't have to use our variable
space to handle it. Well, if we use the BS2p or BS2pe we don't have to; we can use the