I agree the hard part is keeping it usable!
My problem is that this is my first 'LCD Navigation' project with buttons. What I want and what I can do are not in alignment...
I WANT the program to behave like this:
Initialize:
- warm up LCD, etc.
- Ready interrupt buttons on RB0 and RB1 (menu & select)
- set counters to zero
main:
while no buttons are pressed
- go get data
- If recordflag=1 then
gosub recorddata
endif
- covert data to info
- show data view on LCD
If Menu=1: Gosub view1
If Menu=2: Gosub View2
If Menu=3: Gosub view3
Goto main
If main interrupt menu (B0) is pressed cycle through 3 options:
- Main Menu View - Explans to press B0 to move to next menu B1 to select
- pressing B1 here does nothing. Pressing B0 moves to next view
- Change View (BO/B1)
- If I press the B1 button while looking at this view, it selects it
- Select Menu1 - If I press B1, it selects it and returns to main
- If I press B0, it shows the next menu ->
- Select Menu2 - If I press B1, it selects it and retunrs to main
- If I press B0, it shows the next menu ->
- Select Menu3 - If I press B1, it selects it and retunrs to main
- If I press B0, it shows the next menu ->
- Select Exit - If I press B1, it selects it and goes to change view
- If I press B0, it shows Menu1 ->
- Start Recording(or stop recording if it is already on) (B0/B1)
- If I press the B1 button while looking at this view
- set recordflag to (on/off) depending on what current state is
- If I press the B0 button while looking at this view, it moves next view
- Playback recorded data(B0/B1)
- If I press the B1 button while looking at this view, it selects it
- takes me to a view that shows a warning that data will be dumped
- if I press BO/B1 it will cancel this and return to top
- If I press the B0 button while looking at this view, it moves next view
- Exit (go back to where I was)
- If I press the B1 button while looking at this view, it selects it
- If I press the B0 button while looking at this view, it moves first view
DURING this menu 'viewing', I want the processor to continue to take data in on the serial port.... If I DON'T click any BO/B1, after a certain amount of time, it should just COME BACK to the last menu# it was on...
My problem is that I can only seem to trap for B0, then cycle through one menu at a time, and ALWAYS select that one (can't skip it). Pressing B1 is not doing anything, and I am not sure how to turn it on as an interrupt.. (18F2525 supporst multiple INT, and I THOUGHT I turned them on..)
Any hints?
Thanks,
Tom
Bookmarks