djc
Advanced Member level 1
- Joined
- Jan 27, 2013
- Messages
- 402
- Helped
- 3
- Reputation
- 6
- Reaction score
- 2
- Trophy points
- 1,298
- Location
- India
- Activity points
- 4,554
I am operating relay in timer 1 interrupt in atmega8. Interrupt is of 2sec. but the problem is that we can't give delay in interrupt and relay won't operate without delay. SO how to operate the relay with delay in timer interrupt. I want to toggle the relay each time interrupt occurs. I tried to use one variable too, so that whenever an interrupt occurs a variable will increase and at particular count relay will toggle their state. But it's not working. Please tell me how to proceed.