Ok, I answered my own question
After looking at the interrupt logic diagram in the data sheet, I realised that I also had to set PEIE in order for TMR1 overflow to wake the PIC. So I added:
And all is working good.Code:PEIE VAR INTCON.6 PEIE=1
Ok, I answered my own question
After looking at the interrupt logic diagram in the data sheet, I realised that I also had to set PEIE in order for TMR1 overflow to wake the PIC. So I added:
And all is working good.Code:PEIE VAR INTCON.6 PEIE=1
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
I got a PM asking if I could post the completed code, so here it is. Sorry about the lack of comments, but most of it should be easy to understand.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks