Hello,
I have managed to set up timer1 as an external timer so that I can put the PIC to sleep and wake up with a 32kHz crystal.
I also would like to be able to use the external interrupt to wake the PIC up from sleep.
Basically when I enable the Gloabl Interrupt the PIC no longer wakes from sleep. I have not set the Global Interrupt bit as I am using the Int Peripheral Bit for the timer1 module.
Does anyone know what may cause the interrupt to stop woking when I put it to sleep?
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Tue Sep 25, 2007 6:33 am
Setting the global interrupt flag means you will have to add a timer1 interrupt handler as well or the timer1 flag will never get cleared and your PIC hangs.
sjharris
Joined: 11 May 2006 Posts: 78
Thanks
Posted: Tue Sep 25, 2007 7:01 am
I just found that out!!
Thanks for reply. It is (fingers crossed) working now!!
Steve
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum