Hey all,
I'm completely new to programming of any kind and I decided to try and write a driver for a XM tuner.
I'm trying to figure out how to send a hex array which has 4 bytes that will change with each command. The 4 bytes will be tuner number (appears twice), the actual event wanting to happen, and the checksum.
To start I want to just figure out how to calculate the checksum and take it from there.
This is the formula:
Step 1: Add byte values: 0xF0 + 0x00 + 0x67 + 0x7C + 0xF1 + 0x0F = 0x2D3
Step 2: Add byte count: 0x2D3 + 6 (Decimal value byte count) = 0x2D9
Step 3: Bitwise AND with 0x7F: 0x02D9 & 0x007F = 0x59 for the Checksum
Any ideas?
Thanks
I'm completely new to programming of any kind and I decided to try and write a driver for a XM tuner.
I'm trying to figure out how to send a hex array which has 4 bytes that will change with each command. The 4 bytes will be tuner number (appears twice), the actual event wanting to happen, and the checksum.
To start I want to just figure out how to calculate the checksum and take it from there.
This is the formula:
Step 1: Add byte values: 0xF0 + 0x00 + 0x67 + 0x7C + 0xF1 + 0x0F = 0x2D3
Step 2: Add byte count: 0x2D3 + 6 (Decimal value byte count) = 0x2D9
Step 3: Bitwise AND with 0x7F: 0x02D9 & 0x007F = 0x59 for the Checksum
Any ideas?
Thanks
Comment