Solved
Unsigned Long Integer
Posted on 2007-04-11
I extracted this info. from an ECM and is an Odometer for the vehicle: 245 128 92 40 195 01 09 The '245 128' states that it's for the engine info pertaining to odometer, the 92 40 195 01 is the odometer value, and the 09 is the Two's complement checksum. I have most of it figured out except for the 92 40 195 01 (odometer number) My protocol book for the ECM states that it is an 'Unsigned Long Integer' and it is ordered by LSB to MSB (least significant byte to most significant byte)
I don't know how to calculate the Unsigned Long Integer from LSB to MSB.
Here's a example of 2 characters from my book: for this sequence - 128 158 29 1 196 where 29 1 is the data - Book reads: "Due to the specification there are two characters of data and they should be treated like an unsigned integer (16 bits where the bits are grouped into 8 bits and sent in reverse order). The interpretation of the data bytes 29 and 1 as an unsigned integer is (1 * 2^8) + (29 * 2^0) = 285. The result must then be scaled by the bit resolution..."
Any help?