Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to make the PIC16F685 to have minimum current consumption?

Status
Not open for further replies.

kahjoo

Junior Member level 2
Junior Member level 2
Joined
Jul 23, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,456
Hi,

I have difficulty to drop the 16F685 to below 1mA even when I tried to get into the sleep mode.
Before goes to sleep mode, I've set the internal clock from 8MHz to 31KHz. Also disable all the setting before entering sleep mode.

The MCU was powered by 5V which having the 7805 regulator dropping 12V to 5V.

We target the MCU to have the uA current consumption as stated in datasheet.

Is that any setting that I've miss out to archive uA current consumption?

Thank You
Kah Joo
 

You don't need to switch to LPRC oscillator, because the clock is stopped in sleep mode anyway. There are some current consuming modules that must be definitely switched-off to achieve a few µA current, e.g. the ADC. A popular fault is to have outputs driving a load, or leave any digital input pin floating. Digital input pins that aren't tied to VCC or GND must be reprogrammed as outputs or at least input with pull-up in sleep mode.

A 7805 or similar standard voltage regulator would completely ruin low-power operation, there are a few special voltage regulators with µA quiescent current available.
 

Hi FvM,

Here are my setting for the MCU before goes to sleep. I make a simple loop as to check the setting to make sure the minimum current was achieve.

Code:
__CONFIG	_FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT


main

	bcf	STATUS,RP1		;Bank1
	bsf	STATUS,RP0		;Bank1
	movlw	b'00000001'	;set osc
	movwf	OSCCON

	movlw	b'10000000'		;b'11001111'
	movwf	OPTION_REG		;TMR0 select
	movlw	b'00000000'
	movwf	WPUA			;set weak pull up PORTA
	movlw	b'00000000'
	movwf	IOCA			;set interrupt on change PORTA
	movlw	b'00000000'
	movwf	ADCON1			;set conversion clock Fosc/8
	;movlw	pa_cfg			;b'00001010'
	movlw	b'11111111';b'00011110'
	movwf	TRISA			;configure PORTA I/O pin
	movlw	b'11111111'			;b'00000000'
	movwf	TRISB			;configure PORTB I/O pin
	movlw	b'11111111'			;b'00000000'
	movwf	TRISC			;configure PORTC I/O pin
	movlw	b'00000000'
	movwf	PIE1			;set interrupt enable
	movlw	b'00000000'
	movwf	PIE2			;set interrupt enable
	movlw	b'00000001'
	movwf	PCON
	movlw	b'00000000'
	movwf	WDTCON

	bsf	STATUS,RP1		;Bank3
	bsf	STATUS,RP0		;Bank3
	movwf	b'00000000'
	movwf	SRCON
	movwf	b'00000000'
	movwf	EECON1

;	bsf	STATUS,IRP		;Bank2&3
	bsf	STATUS,RP1		;Bank2
	bcf	STATUS,RP0		;Bank2
	movlw	b'00000000'
	movwf	ANSEL			;set all digital I/O
	movlw	b'00000000'
	movwf	ANSELH			;set others digital I/O
	movlw	b'00000000'
	movwf	WPUB			;set weak pull up PORTB
	movlw	b'00000000'
	movwf	IOCB			;set interrupt on change PORTB
	movlw	b'00000000'
	movwf	CM1CON0
	movlw	b'00000000'
	movwf	CM2CON0
	movlw	b'00000000'
	movwf	CM2CON1
	movlw	b'00000000'
	movwf	VRCON


;	bcf	STATUS,IRP		;Bank0&1
	bcf	STATUS,RP1		;Bank0
	bcf	STATUS,RP0		;Bank0
	movlw	b'00000000'			;b'00000000'
	movwf	T1CON			;set timer1
	movlw	b'00000000'			;b'00000000'
	movwf	T2CON			;set timer2
	movlw	b'00000000'
	movwf	CCP1CON			;set comparator pin all ground
	movlw	b'00000000'
	movwf	ADCON0
	movlw	b'00000000'
	movwf	INTCON
	movlw	b'00000000'
	movwf	ECCPAS


        sleep
        nop

        END

I've tried to change all the I/O as input but can't get current consumption to be below 1mA.

Do I miss anything in the setting?
 

Hi,

Thanks for info.
However I can't change the 7805 as due to it's the existing product and can't change the footprint.
We tried to reduce the current consumption at idle case of the module.

Regards.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top