PDA

View Full Version : Reducing PIC current to as low as possible...



FromTheCockpit
- 16th November 2009, 01:08
Reduce current consumption:
Hello, I am trying to reduce the current consumption of my PIR transmitter program. I see 700uA on my digital multimeter while the PIC is sleep. Yes, this current is only for the PIC and no external circuitry included.
I would like to ask if someone can suggest any changes to the code so the current can be reduced to as much as possible. Many Thanks



DEFINE NO_CLRWDT

'// For PIC12F635

@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_ON & _BOD_OFF & _CPD_ON & _IESO_OFF & _FCMEN_ON & _WUREN_OFF

TRISIO = %1111110
OPTION_REG = 128
GPIO.0 = 0
transmit:
‘PIC does its job here
goto rest

rest:
while GPIO.0=1
goto encode
WEND
IOCA.0 = 1 ' int on change enabled for GPIO.0
INTCON = %00001000
@ SLEEP
INTCON.0 = 0 ' clear wake up on change int flag

prepare:
‘PIC does its job here
goto transmit
return

FromTheCockpit
- 16th November 2009, 22:30
Anyone out there?

gmglickman
- 17th November 2009, 15:33
I would make sure the unused input pins are tied high or low.

sayzer
- 17th November 2009, 15:40
Running it on 2V would reduce the current.
Also, lower osc speed would reduce the current, too.

Check the datasheet for low power features.

------------

FromTheCockpit
- 17th November 2009, 23:04
Also, lower osc speed would reduce the current, too.

------------

Can this be a good & reliable option:


OSCCON=48 ' reducing Osc speed before going to sleep
PAUSE 1
INTCON = %00001000 ' global ints disabled, int on change enabled
@ SLEEP ' put PIC to sleep
OSCCON=96 ' back to normal speed

Bruce
- 18th November 2009, 01:18
Not much help there since the oscillator is disabled during sleep...;o)

Jerson
- 18th November 2009, 04:28
I'd like to see your schematic to understand where you might be losing current. The PIC cannot consume so much in sleep mode.