Page 1 of 1

SLEEP

Posted: Mon Dec 22, 2025 12:35 am
by ELECTRONICA67
Hello everyone on the forum, I hope you enjoy a Merry Christmas and a Happy New Year 2026 :!:

Continuing with the topic of the SLEEP, WDT, and CLRWDT commands, I'm using a PIC16F1939. It accesses the SLEEP command correctly, although sometimes it doesn't. Previously, I used a PIC16F1847, and SLEEP worked correctly there.

The problem is that the current draw suddenly changes from 0.020 mA to 25 mA after 2 or 3 SLEEP cycles. It starts at 0.020 mA and increases to 25 mA continuously.

This happens repeatedly, I've disconnected transistor outputs, grounded all unused pins, turned off the LCD, and used commands to disable PIC pins, but I can't get the current draw to remain constant while in SLEEP mode.

Initially, I even managed to get the selected outputs to activate correctly when the PIC woke up, and it would return to power-saving mode, but now, with all the changes and tests, it seems like I'm going backward instead of forward.

Could someone help me by taking a look at the flowchart?

I would appreciate any help. :)

Thanks
Enrique

Re: SLEEP

Posted: Mon Dec 22, 2025 10:56 am
by BenR
Hello,

The errata document for that device does have something regarding Sleep which may or may not help, see page 8 of the doc below.

https://ww1.microchip.com/downloads/aem ... 000501.pdf

Re: SLEEP

Posted: Mon Dec 22, 2025 6:30 pm
by chipfryer27
Hi

I have used the 1939 quite a bit, indeed it is a default chip in a couple of my multi-programmers.

I don't recall having much issue with sleep. If I get a chance over the next few days or so I'll load one up and see how it behave during sleep.

Regards

Re: SLEEP

Posted: Mon Dec 22, 2025 10:24 pm
by ELECTRONICA67
Thanks, I appreciate the help.

Best Regards