Connect with us

A very basic, BASIC question

Discussion in 'Electronic Basics' started by [email protected], Jun 15, 2007.

Scroll to continue with content
  1. Guest

    I'm using a PICAXE 08M for a circuit that sits idle wating for an
    input.

    e.g.

    Main:
    If Pin1=1 then Flash 30
    Goto Main

    Since it will sit in this state for hours/days, can someone please
    explain how to put the chip to rest to conserve battery power? I've
    seen the commands Sleep, Wait, and Pause but am not sure they would do
    the trick (or how to use them). I also read you could slow down the
    processor somehow, and that might conserve power. Does anyone know
    how much power is used in the above example? If it's not much. maybe
    there's little benefit to making changes.

    Thanks for any help,

    Mike
     
  2. Lord Garth

    Lord Garth Guest


    You need to make some decisions first. How long will the input be
    present sets a limit as to how long you can sleep your processor.

    For instance, if your processor is asleep for 4 seconds and awake for 1,
    you'll save power but you'll likely miss a quarter second input.

    The solution to the above example is to set a flip flop with the input.
    This
    will hold the data until the processor wakes up, reads it then resets the
    flip flop.
    Use a low power flip flop as the battery drain is almost inconsequential.
     
  3. Jan Nielsen

    Jan Nielsen Guest

    skrev:
    Hi,

    rev-ed has a very active forum for the PICAXE chip where you may get
    faster and better help ( at http://www.rev-ed.co.uk/picaxe/forum/ )

    I believe the commands you are looking for is NAP and SLEEP, however
    they are both very inacurate in their timing.

    The new HIBERNATE should be better, but only on x1 parts.

    /Jan
     
  4. Jamie

    Jamie Guest

    Hmm, well, I think you'll need to build a little signal switch
    circuit on the board that will switch on the Vcc for the pic.
    in turn, the Pic will boot and use one output to keep the switch
    on.
    You'll need some diode isolation so that you can also monitor the
    input signal to the pic. If the signal goes away for a set time , you
    can then switch off the Pic's power via the electronic switch..

    basically , an PMOS type switch with low signal switching.
    Use a diode on the input to isolate the loop back from the PIC
    so that you will see the actually external signal appear at the PIC's
    input and not the loop back signal to the switch..

    P-HEX fet comes to mind for that with low voltage switching.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-