English
Language : 

EMPROT Datasheet, PDF (8/17 Pages) rfsolutions.ltd – Micro RWD EM4102 Low Power Version
ib technology
Host Driver software
Communication with the MicroRWD module is via the TTL level RS232 interface (9600
baud, 8 bit, 1 stop bit, no parity) and uses the CTS line for hardware handshaking. The
Windows applications (supplied with the Evaluation kit) can be used to communicate with the
module or the user can write their own application on a PC or a microcontroller. Please note
that the host software must be able to handle the three distinct polling rates (different periods
between CTS pulses). The following basic communication algorithm can be used:-
Typical host computer “pseudo” driver code
if (Green LED ON (pin 2 = 0))
// Optional check for valid tag in field
{
if (CTS = 0)
// Wait for CTS = 0 (RWD ready to receive command / data)
{
// CTS times out after 6ms so command and all parameters must be sent with
// no gaps otherwise CTS times out and goes HIGH.
// For example, send READ TAG command (with dummy page no.) (0x52 0x00)
SEND_BYTE( 0x52);
SEND_BYTE( 0x00);
// Send command
// Send argument 1
// RWD sets CTS = 1 after last parameter received. RWD module processes
// command, turns on RF for short period, waits then sends reply.
GET_REPLY( );
// Get Acknowledge byte + data
// Response to READ command is 0xC0 (no tag) or 0xD6 + five bytes of DATA.
}
}
Command Protocol
The following commands are supported. The corresponding acknowledge code should be read
back by the host and decoded to confirm that the command was received and actioned
correctly. The serial bit protocol is 9600 baud, 8 bits, 1 stop, no parity (lsb transmitted first).
The status flags returned in the Acknowledge byte are as follows:
b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 1111
| | | | | EEPROM error (Internal EEPROM write error)
| | | | Tag OK (Tag identity code matched to list and authentication successful)
| | | Rx OK (Tag communications and acknowledgement OK)
| | RS232 error (Host serial communications error)
| RELAY (OP2, OP3) Enabled flag
HTRC (or Antenna fault) error flag
Note that bits 6 and 7 are fixed 1’s so that an acknowledge code of D6 (Hex) would generally indicate no errors
with a matched (or authorised) Tag present.
Note also that only the relevant flags are set after each command as indicated in the following specification.
8