CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC power consumption & power saving

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
amcfall



Joined: 20 Oct 2005
Posts: 44

View user's profile Send private message

PIC power consumption & power saving
PostPosted: Wed Nov 09, 2005 11:35 am     Reply with quote

SOrry to bring this up again, but I am woking on a little board and I'm curious about it's power consumption (not all that important, mostly just for my information). The app is as follows:

12F683 w/ nanowatt technology
two inputs (A4 and A5) using internal pullups, connected through momentary switches to ground
one input from host PC on A0
using hardware PWM, 200Hz on A2
internal pullup for _MCLR enabled
other pins N/C
internal OSC @ either 2Mhz or 32Khz

When the enable line from PC goes low I switch the oscillator to 32khz, which brings me down to about 113uA. I then switch all pins (other than enable, A0) to outputs, disable port a pullups and set the outputs low. I then enter sleep, and wake up with the WDT. When it's sleeping it seems to draw about 90uA. Seems like it could be a lot lower, from how I'm reading the datasheet. However I read somewhere that using the internal oscillator draws more power than an external XTAL. As I said it's not critical, more of a how low can you go kinda thing.

Avery
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Wed Nov 09, 2005 1:10 pm     Reply with quote

Try switching to an external oscillator, and you'll probably halve your power consumption. At the uA you're at, you can probably outlast the shelf life of an idle Energizer. I don't know the exact numbers, but i do remember that internal oscillators do burn up significant current when you want to hover in the <100uA consumption range.
Ttelmah
Guest







PostPosted: Wed Nov 09, 2005 5:44 pm     Reply with quote

When asleep, the oscillator is stopped. The internal oscillator draws more current when awake, but not when asleep.
However it is _critical_, to turn off all peripherals. The PWM, should be stopped, the ADC, should be stopped, the comparator disabled etc.. The 'worst' one, is the brown-out detector, and the internal voltage reference, which can each draw around 60uA...
You should be able to get current figures below 35uA, with care.

Best Wishes
amcfall



Joined: 20 Oct 2005
Posts: 44

View user's profile Send private message

PostPosted: Wed Nov 09, 2005 6:14 pm     Reply with quote

Ttelmah wrote:
When asleep, the oscillator is stopped. The internal oscillator draws more current when awake, but not when asleep.
However it is _critical_, to turn off all peripherals. The PWM, should be stopped, the ADC, should be stopped, the comparator disabled etc.. The 'worst' one, is the brown-out detector, and the internal voltage reference, which can each draw around 60uA...
You should be able to get current figures below 35uA, with care.

Best Wishes


Thanks for the pointers, I'll look into it tomorrow. ADC, PWM + associated timer, and comparator are all off. I hadn't realized the brownout mattered, time to look at at the code.....

Ah ha! Brownout is enabled! Many thanks Ttelmah, we'll see tomorrow how low she goes with it disabled.

Avery
amcfall



Joined: 20 Oct 2005
Posts: 44

View user's profile Send private message

PostPosted: Thu Nov 10, 2005 7:47 am     Reply with quote

After changing the fuses it's at around 4uA.

Thanks

Avery
Ttemah
Guest







PostPosted: Thu Nov 10, 2005 8:46 am     Reply with quote

That actually sounds slightly better than I'd have expected, unless you are running on a lower Vdd?. The watchdog alone, has a 'typical' current of 8.4uA at 5v, but drops to 2.7uA at 3v. The battery life should be pretty impressive at this level. :-)

Best Wishes
amcfall



Joined: 20 Oct 2005
Posts: 44

View user's profile Send private message

PostPosted: Sat Nov 19, 2005 9:14 am     Reply with quote

Ttemah wrote:
That actually sounds slightly better than I'd have expected, unless you are running on a lower Vdd?. The watchdog alone, has a 'typical' current of 8.4uA at 5v, but drops to 2.7uA at 3v. The battery life should be pretty impressive at this level. :-)

Best Wishes


No, it's running at 5V. Of course the meter I'm using isn't the best, so there could easily be a 10% error (though it still seems very low, I'll test another board). Regardless, I'm pleased! Thanks for the tips Ttemah, as I learn about them I really love these uControllers.

Avery
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group