Interrupt Menu System Example and Help Needed


Results 1 to 9 of 9

Threaded View

  1. #2
    Join Date
    Feb 2003
    Location
    Delaware
    Posts
    30


    Did you find this post helpful? Yes | No

    Default I use a pot hooked to an analog port for scrolling.

    That's right my secrets out. I have done a few projects that involve user interfaces and I like to use a pot to scroll through menu items. I also use a single button and assign it different funtions based on how long its held down. You see I like to use a timer to debounce my switch. I set a timer to run free with a 1 mS period. Then when I service its interrupt I check to see if the button is pressed and if it is I increment a counter. Back in my main loop I check the value of the counter and if it is > then say 1000 I toggle an output, if it is > then 3000 I enter the menu screens. If the button is not pressed I zero the counter.

    Hope this helps,

    Joe Kupcha.

    P.S. Consider using a harware UART so that you won't need to wait and you won't miss any characters.

    Edit: If you want to use buttons for navigation you can save I/O by using an analog port and setting up a resistor network with the switches shorting out indivdual resistors.
    Last edited by cupajoe; - 27th March 2005 at 19:53. Reason: Forgot about buttons and analog ports.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts