How to write some number let's say "5" into memory.
Then read it and display it on LCD.
Becuse i have to increase each number, after each button click,
what is the best way to make this work...
button press
5 -- write to memory
read from memory
display until next button click
6 -- write to memory .....
Thanx in advance
Guest
Re: Eeprom question
Posted: Thu Feb 10, 2005 7:28 am
TaiChipy wrote:
How to write some number let's say "5" into memory.
Then read it and display it on LCD.
Becuse i have to increase each number, after each button click,
what is the best way to make this work...
button press
5 -- write to memory
read from memory
display until next button click
6 -- write to memory .....
After the button press, you would increment a variable in RAM at the next button click, then store it in EEPROM. You might want to read back the variable you just saved in EEPROM and verify if it matches the variable you have in RAM. Reason why i say this is - suppose the write to the EEPROM location failed for some reason or another. You don't want to display the wrong character on the LCD.
As it stands though, your pseudocode should work just fine.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum