So my project requires a menu with submenus. I have used a shift register to serially communicate with HD44780 16x2 and everything works fine. So, only 3 pins are involved for writting bytes to the LCD.
From the software side, I've made two look up tables. One holding the text to be written in the lcd and an other one holding info such as address of text, action on enter pressed etc. So far I have built the menu and responds properly as it was supposed to. Menu is like this:
------------------------
Set Time <-
Set Date
------------------------
Set Delay 1
Set Delay 2
Line 5
Line 6
...
Line 10
I am striving on finding a nice solution on how to proceed after the user presses enter and proceeds.
The problem is that for each choice, the buttons functions whould be different. In some cases the up/down buttons should move Left/Right, in other cases should react again as Up/down and the data that the user should insert have different restrictions e.g. number ranging 1-10, or 1-59 or Letters etc.
I need some tips about handling this.
From the software side, I've made two look up tables. One holding the text to be written in the lcd and an other one holding info such as address of text, action on enter pressed etc. So far I have built the menu and responds properly as it was supposed to. Menu is like this:
------------------------
Set Time <-
Set Date
------------------------
Set Delay 1
Set Delay 2
Line 5
Line 6
...
Line 10
I am striving on finding a nice solution on how to proceed after the user presses enter and proceeds.
The problem is that for each choice, the buttons functions whould be different. In some cases the up/down buttons should move Left/Right, in other cases should react again as Up/down and the data that the user should insert have different restrictions e.g. number ranging 1-10, or 1-59 or Letters etc.
I need some tips about handling this.