anjalimidhuna
Member level 3
Hi all,
i have stuck with interrupt problem. My program doesn't enter into the interrupt routine. I am using PIC16F877A with 4 MHz crystal freq.I used MP LAB with Hi-tech C.following is my code
any config setting required to work isr ? i can't realize my problem. The code build successfully but doesn't give any output .
i have stuck with interrupt problem. My program doesn't enter into the interrupt routine. I am using PIC16F877A with 4 MHz crystal freq.I used MP LAB with Hi-tech C.following is my code
Code:
void interrupt isr(void)
{
unsigned int Count=0,Count1=0;
if(TMR1IF)
{
Count++;
if(Count==15)
{
Count1++;
}
TMR1IF=0;
TMR1IE=1;
}
}
void main()
{
TRISC4=0;
RC4=0;
T1CON=0b00000001;
TMR1H=0XFF;
TMR1L=0XFF;
INTCON=0b11000000;
PIE1=0b00000001;
while(1)
{
if(Count1>=1)
RC4=~RC4;
for(int A=0;A<=5000;A++);
}
}