NefMoto

Technical => Reverse Engineering => Topic started by: Keith-i on October 29, 2019, 02:17:24 AM



Title: Fuel consumption in 0x480 - need help understanding
Post by: Keith-i on October 29, 2019, 02:17:24 AM
I'm grabbing can frames from the EDC16 in my 3.0 tdi to display various info such as rpm, engine temp etc. So far I have been successful but I am having difficulty understanding the fuel consumption data. It is split across bytes 2 & 3 in 0x480.

As far as I can tell, byte 2 holds the fuel consumption low value, whilst bits 0-6 of byte 3 holds the high value. Bit 7 of byte 3 is the consumption overflow marker.

So what is the 'overflow' marker for?

If I get say C7 CE in hex which rearranged to high value low value order is CE C7.
In binary this is 1100 1110 1100 0111. Drop the first 1 as that is the overflow mark I get 0b100111011000111 which is dec 20167. Is this correct? Presumably if I then calculate the next reading at 20ms interval I can calculate average consumption.