16F628A sleep current


Closed Thread
Results 1 to 6 of 6
  1. #1
    David Marks's Avatar
    David Marks Guest

    Default 16F628A sleep current

    I am using a 16F628A as a timer with one led on Porta and a 6 position switch pulling down Port b 1 - 7 to set times (portb.0 is used as the interrupt to wake up after @sleep) I have finally got the thing sleeping and waking up OK but the current when asleep is a disappointing 250microamps. Im certain that I had it down to about 30 the other day prior to having some programmer problems but can't replicate that. Is this the best I am likely to do ? Any comments would be appreciated

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    can you post your whole schematic??? will be easier to figure with it then with words.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    David Marks's Avatar
    David Marks Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Steve,
    Bear with me, Haven't found out how to attach graphics yet ! Actually there is vitually nothing of it. Vss and Vdd to usual pins. MClr (pin3) to +5. A3 via resistor and LED to 0v.
    Pusbutton between rb0 and 0v. Power from 3 AAA cels permanaently connected. Am using code from this forum to set up the sleep and wake routines which seem to work O.K. so there seems little to draw current (Option register used to enable weak pull ups on portb. I didable all the software except one short piece which swithces on porta.3 and pauses for a couple of seconde (which it does do !). I will now investigate how to post scematics, sorry about that. Thanks for the response
    David

  4. #4
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Hi David,
    What about the
    "6 position switch pulling down Port b 1 - 7 to set times" ?

    Are any of those switches ON? If so, the pullups on port B will use some current.

    Arch

  5. #5
    David Marks's Avatar
    David Marks Guest


    Did you find this post helpful? Yes | No

    Smile

    Hi Arch,
    You're a genius! I haven't connected the 6 way switch yet, but i HAD connected one of the pins (rb1) to 0v to select a specific time. If I wait 'til the time is selected and the led lights (drawing about 9mA) when the LED times out the PIC goes to sleep and current drops to about 200 odd microamps. But if I disconnected the RB0 to )0v link the consumption drops to only about 30 microamps ... brilliant.. Just have to figure out how to get round that in software now. Probably disabling the weak pull up on portb will do it. Well I'm off for a scotch now, if you guys were a tad nearer I'd pour you one too !
    Cheers
    David

  6. #6
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Hi David,
    Great to hear you got the current down - too bad I couldn't be there to share a round!

    Was thinking about the 30 uA... Even that seems a bit high for sleep (if I remeber, with all the extra stuff off, a '628 should idle around 5uA or so).

    Unless you're using them - you might check to see if all the analog stuff is OFF, brown-out detect is OFF, and there are no 'floating' input pins.

    To eliminate pullup current in software, you could just make the pin a LOW output when you're done checking its state - pullups are disabled when pin is an output.
    If you do this, use a resistor of about 330 ohms in series with your pull-down switch, in case the pin ever goes output HIGH for any reason (don't want a short!).

    Arch

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  3. 16F628A current high during sleep
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th October 2006, 10:21
  4. SLEEP mode 16F628A
    By Michael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th April 2006, 17:26
  5. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06

Members who have read this thread : 1

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