romel_emperado
Advanced Member level 2
- Joined
- Jul 23, 2009
- Messages
- 606
- Helped
- 45
- Reputation
- 132
- Reaction score
- 65
- Trophy points
- 1,318
- Location
- philippines
- Activity points
- 6,061
I understand now why it is needed...
here is my way of disabling the interrupt.. it can be this way or it is not the right way?
here is my way of disabling the interrupt.. it can be this way or it is not the right way?
PHP:
void interrupt timer0()
{
if(T0IF == 1)
{
T0IF = 0;
count++;
if(count == 15)
{
RA2 ^= 1; //toggle LED
count = 0;
}
}
PEIE = 0; // Disables all peripheral interrupts
}