wiki:KyoshoICserialcom

Version 7 (modified by pinwc4, 15 years ago) (diff)

--

Kyosho IC lap counter communication overview

The Kyosho IC lap counter is based on the Melexis 90121 RFID chip with an Atmel microcontroller. In order to communicate with this RFID reader you must set your serial device to 38400 baud, 8 data bits, 1 stop bit, no parity.

Automatic Polling Mode

The Kyosho IC lap counter hardware is capable of automatically polling for RFID's and returning the results without sending repeated inventory commands. Unfortunately this mode does not return the UID, instead it returns the data written to block 1 (data begins at block 0) of the RFID. Block 0 and block 2 must also be populated with information for this mode to work. Each tag must have unique data in block 1 for this mode to work correctly. When initializing the tag you can ensure that it has unique data in block 1 by using the last 4 bytes of the UID as the data. The following is an example of data that could be stored to the first 3 blocks for this mode to work:

Block  00  ACAE53E0
Block  01  AABBCCDD
Block  02  01160908

The automatic polling mode is enabled by sending the following command as hex codes:

31 04 01 34

While this mode is enabled anytime an RFID is detected a packet of information will be sent. The packet will be in the following format:

Byte 1 is the start of the frame, always A3 for the polling method
Byte 2 is the length of the frame including checksum
Bytes 3-6 are the data from block 2 of the tag in reverse byte order
Byte 7 is the number of times the tag was detected
Bytes 8-10 are unknown
Byte 11 is the checksum

An example response packet for a RFID tag that uses the example data listed above for blocks 1-3 would look like this:

A3 0B DD CC BB AA E1 01 00 00 48

In this case the data from block 2 is in reverse byte order, showing up as DD CC BB AA.

checksum

Checksum

The checksum for the Kyosho IC lap counter is just a simple XOR operation on all the bytes of the packet.

Tag Initialization

Remember to initialize the tag if using automatic polling mode.