Help with setting adcon1 for 16f877


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    WooHoo, that's great.

    That's odd about the voltage in sleep mode. The only thing I can see is the voltage divider coming from the battery. If RC4 were set to input when going to sleep, it would leave just a 10K resistor between the batteries and RA1. Since the battery voltage is higher than VDD, it would conduct through the protection diodes of the RA1 pin to VDD. With 10K and 6V you could easily push 100uA or more thru that way. With the pic in sleep mode it will draw less current than is flowing thru the diode, causing VDD to rise.

    However, I don't see any reason why it shouldn't still be doing that. Like I said ... That's odd.
    Added: Unless the battery voltage has dropped to a point where it's not pushing as much current thru the diode??

    ... there are voltage regulators that have a low battery alarm built into the chip ...
    The MIC2954-08BM is similar to what you're using but also has an ERROR output that goes low when the output voltage drops below it's regulation point. But its an 8-pin SOP package, so it may not be the best choice if you're making a through hole board.

    About the dead battery detection, hopefully somebody else here can answer that one. I don't know enough about them.
    Last edited by Darrel Taylor; - 16th August 2005 at 11:21.
    DT

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Ha ha!

    I just scrolled up and looked at the schematic again. And if you actually wired it that way, then it makes sense now.

    I put the voltage sense on VDD instead of the batteries. That way there's no leakage through the diodes. And, since you have a reference that is independant of VDD you should be able to tell when the batteries are too low to hold the regulation point. But, my previous explanation is probably what was happening before.

    What a memory, NOT!

    Darrel

Similar Threads

  1. OSCON setting for 18F4520
    By Dennis in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 29th November 2009, 16:18
  2. PBP 2.60 & ADCON1 problem
    By bitbangerbob in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st October 2009, 13:06
  3. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 15:01
  4. code size VS speed optimization setting?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2008, 15:38
  5. Setting up ADC....
    By robertmark68 in forum General
    Replies: 1
    Last Post: - 11th August 2006, 19:08

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