Searching \ for '[PIC] PLVD?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'PLVD?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] PLVD?'
2007\02\13@131148 by Harold Hallikainen

face
flavicon
face
I'm looking at the programmable low voltage detect in the 16F636. I'd like
to enable it now and then to check the battery voltage instead of leaving
it on all the time (draining the battery). It LOOKS like the PLVD is edge
triggered. The startup instructions say:

To setup the PLVD for operation, the following steps
must be taken:
• Enable the module by setting the LVDEN bit of the
LVDCON register.
• Configure the trip point by setting the LVDL<2:0>
bits of the LVDCON register.
• Wait for the reference voltage to become stable.
Refer to Section 8.4 “Stable Reference
Indication”.
• Clear the LVDIF bit of the PIRx register.
The LVDIF bit will be set when VDD falls below the
PLVD trip point. The LVDIF bit remains set until cleared
by software.

But, what if Vdd is already below LVDIF when I start it? It seems like it
will never be set again. Am I reading that correctly? Any ideas on how to
get around that? I'd like to only check the battery when the device is
connected to an external computer that is asking the battery to be
checked.

THANKS!

Harold



--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2007\02\13@141150 by Andre Abelian

flavicon
face
Harold,

Use 3v to 5v boost converter that has 10 micro amp standby.
most boost converters have low battery detect in this case you do not need
to use pic LVD. I tested when the battery voltage gets down to 2 v it is
about to die so it is good up to 2 v.
Do not use capacitor based charge pump they take lots of energy
use inductor based boost converter. I do not remember the part number
but it was from Maxim.

Andre Abelian



{Original Message removed}

2007\02\13@144223 by Harold Hallikainen

face
flavicon
face
Thanks for the response! Actually, I've got the circuit running on a 3V
lithium battery directly (no boost converter). This is an exteremly small
board with just enough room for the PIC, an eeprom, and a few other parts
on one side, and the battery on the other. What I'd like to do is have a
way to determine if the battery is still ok. I'm thinking of using the
PLVD on the 16F636. I'd turn it on with the lowest detect voltage (I think
that's 2V), clear the LVD interrupt flag, then start stepping the detect
voltage up and looking at the IF. Ideally the IF will not trip until I go
above the actual battery voltage, so I can get an idea what the battery
voltage is. I'd then shut down the PLVD to save battery power. I'm
guessing/hoping that the switches on the PLVD voltage divider open before
the next one closes and that input capacity on the comparator holds the
old voltage until the new one is selected so I don't get any false LVDIF
trips through the process.

Harold


{Quote hidden}

> {Original Message removed}

2007\02\13@153134 by Robert Rolf

picon face
> I'm thinking of using the
> PLVD on the 16F636. I'd turn it on with the lowest detect voltage (I think
> that's 2V), clear the LVD interrupt flag, then start stepping the detect
> voltage up and looking at the IF. Ideally the IF will not trip until I go
> above the actual battery voltage, so I can get an idea what the battery
> voltage is.

{Quote hidden}

They are likely using a comparator and a Set/Reset latch for the LVDIF bit (least gates).

The Vref divider is likely a resistor tree with transmission gates multiplexing
the voltage to the comparator, so it is quite likely you will get glitchs
if you change the reference while the PLVD is 'active'.
That is why you have to
" Clear the LVDIF bit of the PIRx register." after the reference settles.

You may have to reset the LVDIF bit each time you step, but since it sounds like
a S/R latch (vref settling delay) it will immediately trip after the bit clear
if Vbatt < Vsetpoint so your stepping the reference idea should work as you require.

Do let us know how it turns out. This looks a useful way to handle the LVD loading issue.

Robert


More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...