[SOLVED] counter using external interrupt

Status
Not open for further replies.

cyanpraveen

Junior Member level 3
Joined
Mar 31, 2011
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,527
i need to count number of time the LED gets turned off... for that i had used external interrupt... but the problem is when i call the interrupt the count increases by 2 when led turned on and it increase again 2 when turned off.

In debugger mode my program works prefectly.. but while displaying only this problem arises...

Could any body pls give me a solution
 

The external interrupt comes from a keystroke? If yes, your problem is a key bouncing, I think so.
One solution is using a sw debouncing
Send also your program and circuit here ...
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…