Data Sheet
Copyright © Parallax Inc. RFID Read/Write Module, Serial (#28440) v1.0 6/29/2010 Page 4 of 10
Command Set
0x01: RFID_Read
Read data from a specified address
Input: Address location (1 byte), valid locations are 1-33 decimal
Output: Status byte (1 byte) + data (4 bytes)
Example:
SEROUT RFID_TX, Baud, ["!RW", RFID_Read, ADDR_Serial] ' Read tag's serial number
SERIN RFID_RX, Baud, [err, STR data\4] ' Get status byte & data bytes
0x02: RFID_Write
Write data to a specified address
Input: Address location (1 byte), valid locations are 3-31 decimal + data (4 bytes)
Output: Status byte (1 byte)
Example:
' Write $FEEDBEEF to address 3 (User Data Area)
SEROUT RFID_TX, Baud, ["!RW", RFID_Write, 3, $FE, $ED, $BE, $EF]
SERIN RFID_RX, Baud, [err] ' Get status byte
Note: After writing the specified data to the tag, the RFID Read/Write Module automatically performs a
read function to verify that the data has properly been written.
0x03: RFID_Login
Login to the tag (required to use password protection features)
Input: Password (4 bytes), default = 0x00000000
Output: Status byte (1 byte)
Example:
' Login to tag with password
SEROUT RFID_TX, Baud, ["!RW", RFID_Login, $00, $00, $00, $00]
SERIN RFID_RX, Baud, [err] ' Get status byte
0x04: RFID_SetPass
Change the tag’s password
Input: Current password (4 bytes) + new password (4 bytes)
Output: Status byte (1 byte)
Example:
' Change password from current ($00000000) to new ($FEEDBEEF)
SEROUT RFID_TX, Baud, ["!RW", RFID_SetPass, REP $00\4, $FE, $ED, $BE, $EF]
SERIN RFID_RX, Baud, [err] ' Get status byte