bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Wed Oct 07, 2009 10:16 am |
|
|
You're doing that backwards.
You want the INT_EXT to monitor your button.
Toss out a flag to a main routine that say the button has been tripped and then with that flag, execute code that debounces the button and then checks for its valid states.
THEN, depending on that state, set your LED accordingly.
If that's all you're doing, it probably doesn't need to be interrupt driven.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|