SLEEP

For general Flowcode discussion that does not belong in the other sections.
Post Reply
ELECTRONICA67
Posts: 150
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 27 times
Been thanked: 9 times

Flowcode v10 SLEEP

Post 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
Attachments
ReadRTC.fcfx
(17.49 KiB) Downloaded 7 times
Foto2.jpeg
Foto2.jpeg (137.14 KiB) Viewed 92 times
Foto1.jpeg
Foto1.jpeg (135.92 KiB) Viewed 92 times

BenR
Matrix Staff
Posts: 2049
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 544 times
Been thanked: 727 times

Re: SLEEP

Post 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

chipfryer27
Valued Contributor
Posts: 1784
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 397 times
Been thanked: 610 times

Re: SLEEP

Post 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

ELECTRONICA67
Posts: 150
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 27 times
Been thanked: 9 times

Re: SLEEP

Post by ELECTRONICA67 »

Thanks, I appreciate the help.

Best Regards

Post Reply