Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Menu for keypad integration on PIC32

Status
Not open for further replies.

Dhruv@aks

Newbie level 6
Joined
Sep 4, 2014
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
93
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
 

Use the LCD Command like to "Change the Cursor in ROWS, whenever there is key Pressed",

First try this manually with a Push Button Switch and then after use a algorithm like
It will count for the "Switch pressed"
 

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
 

Hello!

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...

Dora.
 

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
Code:
menu1;->selected
menu2;
menu3;
menu4;
if(key == up)
{
   if(lastkey == down)
   {
    menu1;->selected
    menu2;
    menu3;
    menu4;
   }
}
if(key==down)
{
menu1;
menu2;->selected
menu3;
menu4;
}

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.
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top