90
CipherLab BASIC Programming Part I
The algorithm for programming the RFID reader simply follows the commands related to
COM ports. The virtual COM port for RFID is defined as COM4. Thus,
OPEN_COM(4) : enable the RFID module
CLOSE_COM(4) : disable the RFID module
A$ = READ_COM$(4) : read data from an RFID tag
WRITE_COM(4) : write data to an RFID tag
ON COM(4) GOSUB… and OFF COM(4)
Before reading and writing operations, the parameters of RFID must be specified. The
settings of format are described below.
TagType&
Bit 31 ~ 6
Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Reserved ISO
14443B
SR176 ISO
14443A
Icode Tagit ISO
15693
start% The starting byte of data for the read/write operation.
MaxLen%
Read: The maximum data length (1~255).
0 refers to reading UID data only.
Write: Reserved (Any integer value is acceptable.)
When an RFID tag is read, the data string includes Tag Type, UID, and Data. The data
format for READ_COM$(4) is as follows.
Tag Type ‘V’
‘T’
‘I’
‘M’
‘S’
‘Z’
TAG_ISO15693
TAG_Tagit
TAG_Icode
TAG_MifareISO14443A
TAG_SR176
TAG_ISO14443B
Tag UID (SN)
Data