Try to change all ports to inputs before entering sleep.
With 18F4520 I can see big difference if I don't do that (~2mA vs 200uA, incl. quiescent current of the regulator).
After sleep change ports back to normal settings before executing next steps.
Also disable pull-ups and use external pull-up with power sw.
Hi,
Can you post the circuit diagram so we can see what's connected to what?
If you have an input with a pullup resistor (internal or external) and that input is pulled low by whatever is interfaced to it then current WILL flow thru pullup resistor and contribute to the total current drawn by the circuit.
Going to external pullup resistors powered thru a MOSFET won't gain much compared to simply disabling the internal pullups - as far as I can see.
The dropout voltage of the regulator doesn't have much to do with this. It's the "idle current" you're interested in, how much the regulator itself consumes in order to operate. The datasheet states 150uA max
/Henrik.
My experience with the PIC18F14K50 and Sleep mode.
First thing I would suggest is to add @NOP right after the @ SLEEP command.
It could be the rascal is not even going to sleep!
Next make any unused pins an output (HIGH). Left floating as inputs was causing erratic higher Sleep currents that varied in the 10's to 100's of uA.
One last thing that really cleaned house before going to sleep was @RESET.
But my routine was structured to power up then go right to sleep until an IOC occurred that woke it up.
After chores were done and activity was quiet for a little and nothing happening.... @RESET... get back to sleep!
And of course the as the guys suggested, all external loads to the PIC need to be considered, they add up.
Louie
Bookmarks