- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Everyone,
I am started working on the PSOSC 3 EVB i would like to configure timer for 2sec and 5 sec interrupt (button press detection) so i cant able to execute both logic in an simple way so i request can anyone provide me some suggestions or ideas or examples how to configure the timer to detect the button pressed for 2 sec follwed by the interrupt exection and then 5 sec button press followed by timer interrupt execution any hlep will be greatly aprreciated
Thank you
prabhu
Solved! Go to Solution.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Program a state machine in HandleSwitch as
static uint SwitchState = 0;
switch(++SwitchState)
{
case 1: Dothis();
break;
case 2: DoThat()
break;
case 3: DoNothing();
SwitchState = 0; // Begin new cycle
default:
SwitchState = 0; // Recover from unknown state
}
Bob