Cool - I just checked my OSCCON settings, and bit 7 was clear - set it, and now it sleeps great. Thanks guys - didn't have a clue that the oscillator had anything to do with sleep. On 5/21/05, David Duffy wrote: > Dave Turner wrote: > > Hi, > > > > I just finished making a program to use EEPROM. After the read and > > write is complete, I execute this: > > > > movwf TXREG ; send it > > > > > > sleep ; die off > > > > > > bsf porta,2 > > > > > > Now, when I run the program, the LED on porta,2 comes on!!. Am I just > > misinterpeting the sleep instruction (it sort of turns off the PIC, > > right?). I double checked that the watchdog timer is off. > > Could the interrupt that happens at the completion of sending > the byte out of the USART is waking it back up straight away? > David... > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- -- All us base are belong to you. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist