HELP me saving the odometer reading into EEPROM

How will you detect that power is going to go away, prior to it going away and terminating the sketch?

ohhh..
thats not a big deal..
I have the A0 of the atmega measuring the main voltage.. and a big capacitor is also connected in parallel to the main supply..
So when I will detect that the A0 has gone below a certain value the code will write the current wheelRevs into the EEPROM with the existing power stored in the capacitor..

Hummm now the write to EEPROM part..

will you please show me with an example please..??
I am not able to understand much from the bitshift reference page.. :frowning: