Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Advice on 2 button Menu

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi guys:

I am working on a device with a 4 digit LED 7 segment display based around a 16f882
@ 8Mhz.

There are 2 momentary buttons.

For each feature in the device there needs to be set an associated value

So if there are 10 features, I need to cycle through them bidirectionally and then select 1 and then alter the associated value, also bidrectionally. Ideally the value should alter slowly if I hold down a button and then speed up after a bit.

Then I need to get back out to the feature menu level to move to another feature to setup.

When done I need to exit the menu

I Already have the debounced code in place to determine key up, key down & key hold down for each key. Each key status is stored in 1 byte GPR. I also have the strobing for the display and the computed goto lookup for converting binary to 7-segment digits, with alphanumerics. A 2 byte binary to decimal conversion is working as well to display numbers.

I am using all ASM.

I'd like to get any thoughts before jumping into this as it's my first menu. I can see that press/hold both buttons can start the Menu, then one button to cycle thru features & the other to select. To select the value, I'm thinking to use one button to toggle increase/decrease and the other the change value, and then press/hold the toggle button to accept the value?
 
Not yet finished,.
Is it true that FSR/INDF do not require bank switching to access Bank1 ram? The simulator thinks so.
 
You need to set up your scan routine and during the time when a display is being illuminated you can do all your housekeeping.
The natural delay between each of the displaying will be good enough for the debounce. All you need to do is keep track of the button press and increment a file or decrement the file for each of the effects you want to show on the display. The scan routine looks at the file and displays the effect.
We really need to know what effects you want to display. Each time you increment the file, the display shows the result. It's as simple as that.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top