Hi, I am trying to toggle an led using the rollover of timer0 but nothings happening. I have added the code I have used.
Problem with Timer0 interrupt
Code (Text):
- #include <pic16f1939.h>
- #include <xc.h>
- #define _XTAL_FREQ 500000 //1ms delay
- void interrupt delay(void);
- void main()
- {
- ANSELA=0;
- TRISA=0;
- PORTA=0;
- OPTION_REG = 0b10001000; //WPU's disabled No Prescaler
- INTCONbits.GIE = 1;
- INTCONbits.PEIE = 1;
- while(1)
- {
- ;
- }
- }
- void interrupt delay()
- {
- TMR0 = 0x00;...