hi thank you for your suggestions both of you..
accordingly i tried to write the basic code on my own just to check the overflow of the timer but it is not working. timer overflow flag is not getting set.
i m using PIC16F877A with 8MHz frequency and i m using MikroC PRo for PIC IDE. can u please check the code and let me know what is the error or what is missing?
void main()
{
TRISC=0x00; //configure port c as an o/p port
while(1)
{
PIE1=0x01; //enables the timer1 overflow interrupt
PIR1=0x00; //clear the timer overflow flag
INTCON=0xc0; //enables the global and peripheral interrupt
T1CON |=(1<<TMR1ON); //start the timer
while(TMR1IF==0); //polling the overflow flag
PORTC=0x55;
PIR1=0x00; //clear the interrupt flag
}
}