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
Code:
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
Bookmarks