long countdown timer, how to save power?


Closed Thread
Results 1 to 30 of 30

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429

    Default long countdown timer, how to save power?

    Hi,

    Im creating a device that needs to count down a certain period of time which could possibly be weeks, but it will be battery powered, so i'm wondering the best way to do this in order to maximise battery life.

    I'm going to have the time remaining displayed on an LCD screen for 5 seconds whenever a button is pressed and this will save power by not powering the LCD all the time, but obviously the PIC needs to be running the whole time in order to keep time.

    Does anyone know of any tricks to save power?

    Pic i'm working with atm is 18F1320

    Cheers
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Just thoughts...

    Run the chip as slow as possible (you know that I am sure).
    I can not prove it but it seems the internal OSC uses less power than running an external.

    Is there any time when the device will be exposed to light? A solar cell could help, even indoors, to buffer the batteries.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    No sunlight unfortunately.

    I've currently got it running off the internal OSC at 4MHz. It can go as low as 125kHz, but I don't know how to tell PBP that its running that slow because DEFINE OSC wont allow to specify 125kHz.
    Last edited by Kamikaze47; - 18th June 2008 at 16:12.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Take a look at the OSCCON reg in the data sheet and section 2.5.1 in the PBP manual.
    I can not remember what the correct setting is.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Yeah i looked at that section but couldn't find anything relevant. The closest I can see is the OSCCAL register, but I cant figure out how that would help me tell PBP that i'm using a 125kHz clock.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Try???
    OSCCON = $16

    Section 2.7.1 in the data sheet.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  2. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  3. Replies: 5
    Last Post: - 24th February 2009, 18:55
  4. dual 7-segment countdown timer code
    By dr.ragh in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 30th April 2007, 13:19
  5. Long Timer
    By Tissy in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 1st November 2005, 17:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts