Dear Charu,
There are a number of possibilities. With your circuit posted I have found that it is using a solid state voice recorder as well. So it can be like this:
Let us assume the switches are mode, plus and minus.
1. When the mode switch is pressed once
--> Annonce "Set Minutes", Blank the Hour, and directly increment of decrement minute variable in the clock.
2. When presssed again
--> Annonce "Set Hour", Blank the minutes and inc/dec Hour
3. One more press
--> Set Alarm Minutes
4. One more press
--> Set Alarm Hours
5. Quit
You can also use a counter in the background which increments automatically and is cleared on any press of either the plus or minus button. So when your counter reaches a preset number of seconds you can use this to auto quit from the menu. I use this type of setting in all my menu driven app. So pressing a menu button and doing nothing for sometime returns the system to its normal operating condition.




Bookmarks