Thanks for your response.
No I hadn't done that originally. Once added "VECTOR ADDRESS 0xFFDE TimerOverflow_ISR" to the linker file it is working.
I also took your advice on not having loops in the ISR. I'm using flags instead.
interrupt void TimerOverflow_ISR(void)
{
n++;
if(n<500)
PORTB=0xFF;
TFLG2=0x80; /* clear Timer Interrupt Flag bit by a write*/
if (n >= 500)
PORTB=0x00;
if (n == 1000)
n = 0;
TFLG2=0x80; /* clear Timer Interrupt Flag bit by a write*/
}
Thanks again for your help.