brid0030
- 25th September 2010, 09:16
OK. It's almost 3 am, and I am stuck. Anybody familiar with CRC error checking?
I have data coming into a PIC-based RFID reader, and I am trying to work out a way to do error checking using the CRC checksum that comes with the RFID code. I suppose this is not really a PicBasic question (I can write a checksum procedure easily enough), but I will post the code on how to read in a check RFID numbers if I can get it done.
Here is the raw input from the reader--the first four lines are the RFID number (64 bits), and the last line is a 16-bit checksum:
10001110 11110110
10100010 10110100
00111010 01101111
00000000 00000001
11000011 01000100
I got these data using a logic analyzer on the RFID board. I get the same data pattern over and over, and I have looked exhaustively for errors. So this has to be the correct output from the RFID tag.
I thought that you could simply XOR down each column of bits to get the checksum, but that obviously is not correct. The specifications for the error checking procedure are published here http://www.cw-craft.com/DATA/ISO11785英文.pdf (see page 10). I am not an engineer, so this document is a bit of a mystery to me. At first it seems like the simple Binary Arithmetic (with No Carries) would work, but then there's that diagram on page 10 and the opcode on the next page (why do engineers shun normal language?).
If this is all too much for you, then perhaps you could tell me what this sort of number notation is: (0 x 1 021)? This is the polynomial key for the checksum procedure, but I don't know what the actual number is. Kind of difficult to look up this sort of thing.
I'll be dreaming in binary tonight for sure.
I have data coming into a PIC-based RFID reader, and I am trying to work out a way to do error checking using the CRC checksum that comes with the RFID code. I suppose this is not really a PicBasic question (I can write a checksum procedure easily enough), but I will post the code on how to read in a check RFID numbers if I can get it done.
Here is the raw input from the reader--the first four lines are the RFID number (64 bits), and the last line is a 16-bit checksum:
10001110 11110110
10100010 10110100
00111010 01101111
00000000 00000001
11000011 01000100
I got these data using a logic analyzer on the RFID board. I get the same data pattern over and over, and I have looked exhaustively for errors. So this has to be the correct output from the RFID tag.
I thought that you could simply XOR down each column of bits to get the checksum, but that obviously is not correct. The specifications for the error checking procedure are published here http://www.cw-craft.com/DATA/ISO11785英文.pdf (see page 10). I am not an engineer, so this document is a bit of a mystery to me. At first it seems like the simple Binary Arithmetic (with No Carries) would work, but then there's that diagram on page 10 and the opcode on the next page (why do engineers shun normal language?).
If this is all too much for you, then perhaps you could tell me what this sort of number notation is: (0 x 1 021)? This is the polynomial key for the checksum procedure, but I don't know what the actual number is. Kind of difficult to look up this sort of thing.
I'll be dreaming in binary tonight for sure.