N and V column
Column #120: You Can’t Touch That: Non-contact Access Control
Page 82 • The Nuts and Volts of BASIC Stamps (Volume 6)
' =========================================================================
'
' File....... RFID.BS2
' Purpose.... RFID Tag Reader / Simple Security System
' Author..... Jon Williams, Parallax
' E-mail..... jwilliams@parallax.com
' Started....
' Updated.... 07 FEB 2005
'
' {$STAMP BS2}
' {$PBASIC 2.5}
'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
'
' Reads tags from a Parallax RFID reader and compares to known tags (stored
' in EEPROM table). If tag is found, the program will disable a lock.
' -----[ Revision History ]------------------------------------------------
' -----[ I/O Definitions ]-------------------------------------------------
Enable PIN 0 ' low = reader on
RX PIN 1 ' serial from reader
Latch PIN 2 ' lock/latch control
Spkr PIN 3 ' speaker output
' -----[ Constants ]-------------------------------------------------------
#SELECT $STAMP
#CASE BS2, BS2E
T2400 CON 396 ' reader baud rate
TmAdj CON $100 ' x 1.0 (time adjust)
FrAdj CON $100 ' x 1.0 (freq adjust)
#CASE BS2SX
T2400 CON 1021
TmAdj CON $280 ' x 2.5
FrAdj CON $066 ' x 0.4
#CASE BS2P
T2400 CON 1021
TmAdj CON $3C5 ' x 3.77
FrAdj CON $044 ' x 0.265
#CASE BS2PE
T2400 CON 396
TmAdj CON $100 ' x 1.0
FrAdj CON $0AA ' x 0.665