What kind of checksum can this be?
-
Hi all, I am trying to write a windows forms program to communicate to a CNC-machine from the 1980ties. The machine uses a 6802 microprocessor and communicates with a Desktop computer with a DOS program. The communication is in ASCII characters and is in the following format: 4 spaces and a 3 digit value and a checksum character or 3 spaces and 4 digits and a checksum character. So a total of 7 characters and a checksum character. This is a part of the original message(space represented as | and checksum character bold): ||||853**>|||1370%||||248>|||1204'||||||00**||||||11||||7887||||2156||||2552|||2346**#|||2346#|||1031#** I already tried some things like adding all decimal ASCII values and MOD against all possible values, like ||||853 : 32+32+32+32+56+53+51 MOD some value and add 30 or 31 to make sure result is in the range of printable characters,but no luck. note that 853 and 248 have the same checksum, also 2346 and 1031. I hope someone recognizes the checksum algorithm or can help me to find out how the checksum character is calculated. Thanks, Groover
0200 A9 23 0202 8D 01 80 0205 00
-
Hi all, I am trying to write a windows forms program to communicate to a CNC-machine from the 1980ties. The machine uses a 6802 microprocessor and communicates with a Desktop computer with a DOS program. The communication is in ASCII characters and is in the following format: 4 spaces and a 3 digit value and a checksum character or 3 spaces and 4 digits and a checksum character. So a total of 7 characters and a checksum character. This is a part of the original message(space represented as | and checksum character bold): ||||853**>|||1370%||||248>|||1204'||||||00**||||||11||||7887||||2156||||2552|||2346**#|||2346#|||1031#** I already tried some things like adding all decimal ASCII values and MOD against all possible values, like ||||853 : 32+32+32+32+56+53+51 MOD some value and add 30 or 31 to make sure result is in the range of printable characters,but no luck. note that 853 and 248 have the same checksum, also 2346 and 1031. I hope someone recognizes the checksum algorithm or can help me to find out how the checksum character is calculated. Thanks, Groover
0200 A9 23 0202 8D 01 80 0205 00
Easy, XOR the 7 ascii values together.
" 853>"
32^32^32^32^56^53^51 = 62 ">"" 248>"
32^32^32^32^50^52^56 = 62 ">"" 2346#"
32^32^32^50^51^52^54 = 35 "#"" 1031#"
32^32^32^49^48^51^49 = 35 "#"" 1370%"
32^32^32^49^51^55^48 = 37 "%"" 1024'"
32^32^32^49^48^50^52 = 39 "'"" 00"
32^32^32^32^32^32^48 = 48 "0"" 11"
32^32^32^32^32^32^49 = 49 "1"" 7887"
32^32^32^32^55^56^56 = 55 "7"" 2156"
32^32^32^32^50^49^53 = 54 "6"" 2552"
32^32^32^32^50^53^53 = 50 "2"Alan.
-
Easy, XOR the 7 ascii values together.
" 853>"
32^32^32^32^56^53^51 = 62 ">"" 248>"
32^32^32^32^50^52^56 = 62 ">"" 2346#"
32^32^32^50^51^52^54 = 35 "#"" 1031#"
32^32^32^49^48^51^49 = 35 "#"" 1370%"
32^32^32^49^51^55^48 = 37 "%"" 1024'"
32^32^32^49^48^50^52 = 39 "'"" 00"
32^32^32^32^32^32^48 = 48 "0"" 11"
32^32^32^32^32^32^49 = 49 "1"" 7887"
32^32^32^32^55^56^56 = 55 "7"" 2156"
32^32^32^32^50^49^53 = 54 "6"" 2552"
32^32^32^32^50^53^53 = 50 "2"Alan.
Thank you Alan, I wrote a function in my program and it works perfect. Groover,
0200 A9 23 0202 8D 01 80 0205 00