How to detect low battery in battery powered F683 circuit


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Wow. Thanks Mark - I missed that. I just HATE all these whiz bang "features" that force us mere mortal coders to spend *days* learning a new chip! Grrrr. <end rant>
    SO to implement a pin as output only I use:
    GreenLED var lata.1 ' high = light power LED
    and also set:
    ' config
    TRISa = %011001 ' set I/O directions (0 = output, 1 = input)
    LATa = %011001

    - still not getting it to work with above settings. Do I have bit polarity right for LATA?
    "Do or do not, there is no try" Yoda

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    I think you would declare your variable as

    GreenLED var PORTA.1

  3. #3
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Quote Originally Posted by mark_s View Post
    I think you would declare your variable as
    GreenLED var PORTA.1
    Been testing that and the compiler seems to accept either
    GreenLED var PORTA.1
    or
    GreenLED var LATA.1
    "Do or do not, there is no try" Yoda

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    At this point without posting your complete code it's hard to guess what's wrong.

  5. #5
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Got all the OUTPUTS working fine - no need for LATA configurations apparently. Struggling with some kind of hardware bug - so I'm basically good. No idea how or why I would configure LATA at this point as it all seems to work fine without any direct reference to it.
    "Do or do not, there is no try" Yoda

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default MICROCHIP's an1072

    Maybe this application note from MICROCHIP can help ;-)
    Roger

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    I did this a long time ago with a 6V circuit. The pic was running from the battery (with a series diode = 5.4V) but there was a 3.3V regulator elsewhere on the circuit board. I ran a jumper wire from an ADC pin to the 3.3V reference voltage. As the battery voltage begins to drop, the ADC reading will begin to rise. When the ADC reading reached the desired point, the SOUND command alerted you.

Similar Threads

  1. How can a battery powered PIC turn itself off?
    By tekart in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th August 2012, 10:44
  2. Replies: 13
    Last Post: - 22nd January 2012, 04:48
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  4. 12F683 battery powered remote - energy consumption question
    By silentwol in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th April 2007, 13:23
  5. Battery Powered Need Help!
    By scottl in forum Off Topic
    Replies: 1
    Last Post: - 29th March 2006, 09:52

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