If you have Duty defined as a word, you will have some problems reading and writing to Eprom.
EEprom works in bytes, not words... if you write a word, you will have to do a double read....First read will pick up the MSB, and the second read will pick up the LSB.
If you know that your duty will not go more than 255, then change the Duty to a "Byte" instead of a word. Then a very simple Read/Write to EEPROM is all that is needed.
If your Duty is more, then you will have to read Two bytes, and concatinate <sp> the two bytes together to make up your stored Word.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks