Russ Sprouse
New Member
I am going through the Baseline Assembler tutorials from Gooligum, and am currently looking at Lesson 7. David explains how to put the processor into sleep mode, and explains that GPIO pins should be configured to stop sourcing or sinking current (e.g., a LED turned off) before entering sleep mode, to reduce power consumption.
He also explains that unused pins should be tied to either Vdd or Vss to prevent them from "floating" and causing unnecessary current drain. I am using a PIC 12F509, driving a single LED on GP1. I have tied GP0, GP4 and GP5 to ground (Vss) as suggested, and when the program is running, with the LED lit, the circuit is drawing about 20.4mA.
When I press the pushbutton to enter sleep mode, GP1 is programmed to go low (i.e. turn off the LED, which it does) and then enter sleep mode. But the circuit is still drawing about 11.1mA, which does not jibe with Davids statement that the circuit should now draw "less than 0.1uA." So I am wondering why my circuit is still drawing so much current.
He also explains that unused pins should be tied to either Vdd or Vss to prevent them from "floating" and causing unnecessary current drain. I am using a PIC 12F509, driving a single LED on GP1. I have tied GP0, GP4 and GP5 to ground (Vss) as suggested, and when the program is running, with the LED lit, the circuit is drawing about 20.4mA.
When I press the pushbutton to enter sleep mode, GP1 is programmed to go low (i.e. turn off the LED, which it does) and then enter sleep mode. But the circuit is still drawing about 11.1mA, which does not jibe with Davids statement that the circuit should now draw "less than 0.1uA." So I am wondering why my circuit is still drawing so much current.