Home
LCD-KEYS OnePort
Digital Downloads
C Course
State Machines
Interrupt Secrets
Schematic Tool
PIC Introduction
PIC Programming
PIC Programmers
PIC Compilers
PIC Projects
Tips & Techniques
Store
My SECRET
Oscilloscopes
Contact Me
About Me
Terms of Use
Search This Site
Freebies
Articles
Problem?-Solution
MicroBlog
Books
Resource Links
Site Map
Your Projects
Video du Jour
Rant/Rave
Privacy Policy

User Menu Code

by Jerry
(Indiana)

I have a project which allows the user to change several variable values through the use of a 5-button keypad. I am capable of coding the basic routines for the keypad, however the menu has multiple levels based upon the "security" clearance of the user. Some users can change some variables, while others have access to them all. I need to know if I have to construct if, or switch, statements in my code to handle all of the possible changes in the user-interface. for example:

If I press button A, value 1 is incremented.
If I press button B, value 1 is decremented.

all is well, so far.

If I press buttons A & B, I have access to value 2
The options for value 2 might be inc, dec, multiply by 10, multiply by 100. Each of these options need to be toggled through and implemented if button C is pressed. After about 15 different option levels, and 3 available button presses for each user choice, my if statements are mind-numbing.

Any suggestions.

I hate to admit this, but I am a compiler only novice, I use a pic C compiler for the pic16F877a. Assembler and other detailed code is above me. Any help would be greatly appreciated.

Click here to post comments.

Join in and write your own page! It's easy to do. How?
Simply click here to return to Ask for a Solution to your microcontroller problem
.


footer for microcontroller page