questuk wrote: > I wish to put a PIC into sleep mode then have it wake up every 10 > seconds to check a port for activity, I know how to get PIC into > sleep mode. I believe you can wake it using the PIC's clock (I have > a 4Mhz xtal that runs the PIC) using TMR x and prescaler? Gary: As Byron pointed out, the oscillator stops when the PIC is in sleep mode, so that won't work. If you don't need precise timing, just enable the watchdog timer, assign the prescaler to it, and set the prescaler divide-by ratio to max... You'll end up with a watchdog timer that expires in approximately two and a half seconds. Every four sleep/wake-up cycles, therefore, is approximately 10 seconds. If you need more precision, you can calibrate your code to the watchdog timer dynamically... But it doesn't sound as though you need anything real precise. -Andy === Andrew Warren - fastfwd@ix.netcom.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads