> =A0Running off the 9V battery and regulator, the current consumption for = the circuit varies from 2.15mA with HFINTOSC at Fosc=3D8Mhz, to 0.75mA with= LFINTOSC at Fosc=3D31Khz. =A0This is with no LEDs lit on the demo board. = =A0Obviously this is considerably higher than the datasheet stated Idd for = the PIC itself (Idd at 31uA-65uA for 5V/LFINTOSC 31Khz, 1.3mA-1.65mA for 5V= /HFINTOSC 8Mhz). =A0In another product, we have a PIC16F876 being used with= the LM293 and an external xtal at 8Mhz - this draws around 50uA-60uA durin= g sleep, which is significantly better! > > =A0I have attempted to issue the Sleep command, however it seems like the= PIC is not sleeping - e.g. it is executing commands directly after the Sle= ep command (e.g. turn on an output port driving an LED). =A0Additionally, a= fter going into sleep it is being woken up by a TMR1 counting interrupt whi= ch is being driven by INTOSC.. I'm guessing, but haven't been able to confi= rm anywhere in writing, that LFINTOSC and HFINTOSC should be disabled when = the PIC goes to sleep? > > =A0I have a few issues/questions that I haven't been able to answer via d= atasheets/other resources, and was hoping that someone might be able to put= me in the right direction! > > > =A01) Any ideas why the PIC does not appear to be going to sleep when com= manded? =A0The only interrupt that should be waking the PIC up is on TMR1..= other interrupts such as IOC should be disabled otherwise. > > =A02) Aside from current consumption drop, is there any way of definitive= ly knowing if the PIC is correctly sleeping? > > =A03) When the PIC is sleeping, should HFINTOSC and LFINTOSC be disabled?= =A0Meaning that the only way I could wake up the PIC would be to use e.g. = interrupt on change rather than TMR1 count. > > =A04) Any thoughts on why the current consumption, even when running at F= osc=3D31KHz on LFINTOSC, would be so much higher than the datasheet current= ? > 1. Have you looked at the generated assembly code to ensure that the SLEEP instruction is present? 2. Right after a SLEEP command, toggle an IO line. If you see it toggle, you know SLEEP didn't work. 3. Timer1 must be configured as an asynchronous counter (using an external clock source). The internal oscillators are disabled, so they cannot clock the Timers. I just ran into this in my last project. I ended up using the WDT (which runs separately from the internal oscillators) as my timer to wake from sleep. 4. Any IO drawing current? Pullups enabled? -Scott --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .