>
> Roman wrote:
> >Brian Gregory wrote:
> >>
> >> Roman Black <
EraseMEfastvidspam_OUT
TakeThisOuTEZY.NET.AU> wrote:
> >> > Brian, I have a one-pin solution but need to know
> >> > if the PIC is running from a regulated voltage,
> >> > or if the PIC is running from the (ever decreasing)
> >> > battery voltage?
> >> > -Roman
> >>
> >> I will probably be running the PIC from 5V from a LDO regulator.
> >> The battery will probably be 9V Alkaline.
> >
> >
> >Did you see Dan's suggestion? Basically have a high value resistor
> >from bat + to the PIC pin. 560k will do nice. Use a small ceramic
> >cap, like 0.1uF or 0.047uF etc from that pin to ground.
> >Pull the pin low and then switch it to input and count time
> >in software until it reaches a "1" level, about 1 to 2 volts
> >depending which PIC pin you are using (schmidt input or not).
> >
>
> Actually this was my "guess" as to what Roman's ckt was,
> as he wasn't saying at the time :). Turns out he liked my
> guess better than his own actual ckt.
>
> I hadn't really thought about it much, but Alice mentioned
> offlist that this dohicky is quite dependent upon the tolerance
> on the cap. Then of course you have to worry about calculations
> related to exponential charging waveforms, but I am sure the
> s.w. weenies got a way around exp/log computations.
> ===============