Hi I have jhd204a display connected to a pic32 and a keypad with up/down option.
i want to display a menu on the screen which reacts to to the up down of the keypad.
please help me with the c program
I want to change the selected item of the menu when the user presses the up or down key.
It should do nothing when any other key is pressed.
So my question is how do i select a line from a 20x4 screen.
how can i make a line a selected line using c
Nobody is going to make your homework for you, so I would recommend that
you start writing something and ask what you don't understand.
What you should do (I suppose it's a character display):
1. Find a way to write a normal string at a given position
2. Find a way to write a reversed string (or underline or anything that would
differentiate a selected menu item from a non-selected one.
3. Create a menu.
A menu is a list of menu items. It has a length L.
A menu item is a kind of structure that involves:
- A label
- A position so that you know where to write it.
- A pointer to function to call whatever action you want.
I wrote an article some years ago about how to make a menu using a small graphic display.
You use a character display, but the principle is the same.
Search Menu Madness on Google and you should find it. I will not post the link
because it's a bad idea to advertise another forum...
No i think i have the solution for the selected menu item.
i have a function that writes to the lcd.But My problem is that i have to send the 4 lines together as if i change only 1 line then the the data on screen becomes garbage and corrupts the whole screen.
The function takes the pointer to the data and the address on the screen.
So can i have a static display or i will have to refresh the screen whenever the user presses up or down
this is what i am trying to go about am i going in the right direction.
Also i need a function which can change the color or blink when a menu is selected.