Take the ASCII value, subtract 0x30, if results is >9 then subtract 0x07. Value should then be in hex. If you want to bounds check then test result to make sure it is >= 0 and < 0x10. Then take the first packet hex value and leftshift by 4 and then add to hex value of second packet. Bitwise AND your calculated checksum with 0xFF and compare with the transmitted checksum.
Bookmarks