pest.txt Nov. 10, 1999 Pest data format byte Desc. Value ----------------------------------------- 1 Sync 0xC3 2 Sync 0x9A 3 Byte count (LSB) 4 Byte count (MSB) 5-8 Seconds since midnight Jan. 1 1970 byte 5 = LSB, byte 8 = MSB 9 Time (ms) (LSB) 10 Time (ms) (MSB) 11 PEST status bits Bit 4 = Shutdown complete, Bit 2 = CEP relay ON, Bit 0 = PinPull relay ON 12 PEST data packets available. Set bit indicates packet available Bit 3 = CEP, Bit 2 = RM400, Bit 1 = House Keeping, Bit 0 = DIFP If byte 12 bit 1 set Housekeeping Data (20 bytes total) If byte 12 bit 3 set CEP data (192 bytes total) If byte 12 bit 0 set DIFP byte count MSB DIFP byte count LSB DIFP data (Worst case is 392 bytes) If byte 12 bit 2 set RM400 data (64 bytes) Last two bytes of data packet Checksum (LSB) Checksum (MSB) Notes: The byte count (bytes 3 & 4) includes all bytes including the two sync characters and the two checksum bytes. CRC is calculated using all bytes except the two checksum bytes. If you reverse the last two bytes (bytes 661 & 662 above) they can be included in the CRC and a valid CRC value would then be zero (0). ******************************************************************** * The examples still do not match the above format. I will try to * * get some valid sample data in the next two weeks! * * * * I am still working on getting the actual data format and scaling * * factors. * ******************************************************************** Example: ------------------------------------------------- Example 1. c3 9a 22 00 ca af 0b 38 e6 00 00 20 b8 02 bc 02 be 02 bb 02 f9 07 65 0e bc 0b 00 00 1c 00 00 00 8a 76 date: Mon Oct 18 17:39:54 1999 milliseconds: 230 Total Bytes: 34 CRC: 0x768A Example 2. c3 9a e2 00 cf af 0b 38 e6 00 40 a0 ba 02 bb 02 c0 02 b9 02 f9 07 67 0e bd 0b 00 00 1c 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff aa 4c date: Mon Oct 18 17:39:59 1999 ms: 230 Bytes: 226 CRC: 0x4CAA Example 3. c3 9a ce 00 d6 af 0b 38 bc 02 40 80 fa de 00 02 01 8c ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 9b Date: Mon Oct 18 17:40:06 1999 ms: 700 Bytes: 206 CRC: 0x9B88