28140 Parallax Inc, 28140 Datasheet - Page 10
28140
Manufacturer Part Number
28140
Description
READER MODULE RFID
Manufacturer
Parallax Inc
Specifications of 28140
Rf Type
Read Only
Frequency
125kHz
Features
Single 5V Power Supply
Package / Case
Module
Product
Microcontroller Accessories
Data Bus Width
8 bit
Clock Speed
125 KHz
Interface Type
USB
Operating Supply Voltage
5.5 V
Board Size
46.99 mm x 69.22 mm x 21.84 mm
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
LastTag
#DEFINE __No_SPRAM = ($STAMP < BS2P)
' -----[ Variables ]-------------------------------------------------------
#IF __No_SPRAM #THEN
#ELSE
#ENDIF
tagNum
idx
char
' -----[ EEPROM Data ]-----------------------------------------------------
Tag1
Tag2
Tag3
Name0
Name1
Name2
Name3
' -----[ Initialization ]--------------------------------------------------
Reset:
' -----[ Program Code ]----------------------------------------------------
Main:
Check_List:
Copyright © Parallax Inc.
buf
chkChar
HIGH Enable
LOW Latch
LOW Enable
#IF __No_SPRAM #THEN
#ELSE
#ENDIF
HIGH Enable
FOR tagNum = 1 TO LastTag
SERIN RX, T2400, [WAIT($0A), STR buf\10]
SERIN RX, T2400, [WAIT($0A), SPSTR 10]
FOR idx = 0 TO 9
NEXT
GOTO Tag_Found
READ (tagNum - 1 * 10 + idx), char
#IF __No_SPRAM #THEN
#ELSE
#ENDIF
IF (char <> buf(idx)) THEN Bad_Char
GET idx, chkChar
IF (char <> chkChar) THEN Bad_Char
CON
VAR
VAR
VAR
VAR
VAR
DATA
DATA
DATA
DATA
DATA
DATA
DATA
3
Byte(10)
Byte
Nib
Byte
Byte
"0F0184F20B"
"0F01D9D263"
"04129C1B43"
"Unauthorized", CR, 0
"George Johnston", CR, 0
"Dick Miller", CR, 0
"Mary Evans", CR, 0
RFID Card Reader Serial & USB (#28140 / 28340)
' does module have SPRAM?
' RFID bytes buffer
' character to test
' from EEPROM table
' tag byte index
' character from table
' valid tags
' turn of RFID reader
' lock the door!
' activate the reader
' wait for hdr + ID
' deactivate reader
' scan through known tags
' scan bytes in tag
' get tag data from table
' compare tag to table
' read char from SPRAM
' compare to table
' all bytes match!
v2.1 8/28/2008 Page 10 of 11