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 CCS Technical Support

12F629 @ 32kHz with Cr2032 battery

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



Joined: 19 Oct 2003
Posts: 24
Location: Cambridge, UK

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

12F629 @ 32kHz with Cr2032 battery
PostPosted: Fri Apr 09, 2004 4:10 am     Reply with quote

Hi,

I need to power a 12F629 running at 32kHz for at least 9 months with a CR2032 coin cell (about 200mA hour).

I believe the 629 will still run down to a 2V supply, so my question is, can I supply the PIC with the 3V direct from the battery and get at least 9 months operation out of it?!?

(only current consumption is PIC, i.e. no other ic's)

Is it possible to sleep the PIC for a period of time and wake up on timer1 interrupt, do something then go back to sleep again? if so, please supply code to do this.

Thanks.

Regards,
Darren
chris
Guest







nanowatt technology
PostPosted: Fri Apr 09, 2004 4:08 pm     Reply with quote

Dear Dazlogan,

What you are trying to achieve is the nanowatt technology
of the PIC famalies

Whilst in sleep mode you are likely to consume less than 1 microamp

I am afraid whilst the PIC is in sleep mode the timer in will
be counting and therefore no interrupt will be generated

TO save power download the following

http://techtrain.microchip.com/webseminars/upfhc.aspx?Semid=13&Redir=http://techtrain.microchip.com/webseminars/documents/Nanowatt_Webcast.pdf

YOu could possibly use the 7555 timer IC, it is a more efficent version of the popular 555 timer

Cheers
Ttelmah
Guest







Re: nanowatt technology
PostPosted: Fri Apr 09, 2004 4:35 pm     Reply with quote

chris wrote:
Dear Dazlogan,

What you are trying to achieve is the nanowatt technology
of the PIC famalies

Whilst in sleep mode you are likely to consume less than 1 microamp

I am afraid whilst the PIC is in sleep mode the timer in will
be counting and therefore no interrupt will be generated

TO save power download the following

http://techtrain.microchip.com/webseminars/upfhc.aspx?Semid=13&Redir=http://techtrain.microchip.com/webseminars/documents/Nanowatt_Webcast.pdf

YOu could possibly use the 7555 timer IC, it is a more efficent version of the popular 555 timer

Cheers

Actually Timer 1 _can_ count, provided it has a seperate crystal. What needs to be asked is the 'function' of the device. The easiest way, if accuracy is not important, is to just use the watchdog, when this triggers do your housekeeping, and then go to sleep again. Using Timer 1, is an alternative, or an external clock chip, that implements a 'tick' output, feeding an external interrupt pin. The required operating frequency during the 'on' phase also has a major effect on the total consumption. So some more data is really needed to give an idea of the best solution.

Best Wishes
dbotkin



Joined: 08 Sep 2003
Posts: 197
Location: Omaha NE USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Apr 09, 2004 9:38 pm     Reply with quote

Just so you know, I power 12F629 and '675 devices from CR2032 batteries, and I don't know how long they will last -- none have died yet!! It's been over a year for some. True, they are in sleep almost all of the time. In SLEEP with everything shut off -- no timer1, no BOR, no WDT, etc -- I read 4 to 6 nanoamps. Yes, .004 uA. Those things sleep on not much more than a cool breeze, as long as you pay close attention to making sure you don't burn current somewhere. That means no WDT, BOR, no WPU on low inputs (WPU itself is fine on open inputs), no floating inputs, no LEDs left on, etc. Oh, and 2V is the guaranteed voltage spec. Mine often run on far less, though the clock may get squirrelly at times. It's actually a pain while debugging and testing code sometimes, a .1uF decoupling cap across the power pins will keep the thing from resetting for a while! I have to remember to short Vss to Vdd after disconnecting power.

According to the specs, timer1 at 3V will draw a maximum of 7 uA. A good CR2032 is rated at 200 or 220 hAH. Some are way less, I get Panasonics from Digi-Key by the hundred. Nine months is roughly 6480 hours, so unless my addled brain has misplaced a decimal point T1 will suck down 45 mAH max over that period. So far so good, probably, so now it depends on how often your PIC wakes up and what it does when it's awake, as well as what it uses for a clock -- I like the internal RC oscillator.

In short, whether you can do it in your application depends on what you have to do -- but you certainly can sustain a 12F6xx device for long periods on a CR2032.

Dale
dazlogan



Joined: 19 Oct 2003
Posts: 24
Location: Cambridge, UK

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

The application
PostPosted: Sat Apr 10, 2004 4:41 am     Reply with quote

Hi,

Thanks for your ideas so far.

The application is a simple timer, it must count for a period of 6 months and then let the user know 6 months has ellapsed by flashing an LED.

During the six months count, the LED will be off and no other components will be drawing power - just the PIC.

SO, can i use an external 32kHz crystal - put the PIC into sleep mode and wake on a Timer 1 interrupt??????. If so, how?

The 6 month accuracy doesn't need to be great. Take 6 months as being 366/2 days (183 days).
Tolerance on this is +/- 5 days.

Im wondering whether I do actually need to put the PIC to sleep. If not in sleep mode, then at 3V, 32kHz the data sheet says the PIC will draw 28uA worste case, Timer1 will draw 7uA worste case. Total = 35uA.
Am I right?

So, for a 200mAH CR2032, this means 200mA/35uA hours = 5714 hours

5714/24 = 238 days which is approx. 8 months which is pushing it a little.

I notice the mAH for a CR2032 is different from one manufacturer to another. Some are around the 250mAH which would give me around 10 months which is better.

So can I put pic to sleep and wake on interrupt?
Do you think the WDT will be accurate enough?


Confused

Regards,
Darren
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