That's good, sounds like you are making progress. Now to fix the corrupt calibration....
Those bytes you mention could well be the checksum bytes.
I'm not sure what method they are using but it is weak because you can change the data to some extent and the checksum still works, e.g. subtract 0x01 from a byte and add it elsewhere.
There is a hint on sigrok wiki
https://sigrok.org/wiki/Pico_Technology_PicoScope_3206:
There is a checksum, but is very weak and overly complicated. The last two bytes contain the number of iterations that have to be done to a 14 bit LFSR to get a value that equals the sum of the preceding data when interpreted as signed bytes. The weakness comes from their method of reducing the sum to 14 bits: During summing they reset the intermediate value to zero as soon as it uses more than 14 bits. As the bytes added are signed, this happens very often.
If anyone figures out the checksum algorithm, please let us know!Anyway, here is the cal data from a TC-08 USB.
You can maybe work out where in memory it goes by the location of those checksum bytes.
The zeroes were formally channel offsets for that particular unit, (32bit vars IIRC) subtracted from the raw ADC values but I set them to zero for my particular requirements. You might be able to do a new cal by shorting out all the channel inputs, reading the data and changing the offsets, if you really need to.
const uint8_t cmd_get_cal_response[256] = {
0xc0, 0xe9, 0x0c, 0x00, 0x10, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, /* ................ */
0x00, 0x00, 0x00, 0x41, 0x4f, 0x31, 0x30, 0x35, 0x2f, 0x37, 0x30, 0x35, 0x00, 0x31, 0x37, 0x44, /* ...AO105/705.17D */
0x65, 0x63, 0x31, 0x34, 0x00, 0x00, 0x08, 0xe3, 0x00, 0x00, 0xfe, 0x34, 0x00, 0x00, 0x02, 0x7f, /* ec14.......4.... */
0x00, 0x00, 0xfd, 0x99, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ................ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0x0a,
/* note checksum in last two bytes is over the preceding 254 bytes */
/* you can move bytes around (to some extent) and checksum still works OK */
};