How to convert Resistance to digital data directly
David VanHorn email (remove spam text)
At 10:36 AM 4/29/01 -0700, Bob Blick wrote:
>At 12:09 PM 4/29/2001 -0500, you wrote:
> >>Repeatability is about +-2 percent.
> >Not from where I sit..
> >I'm using the MPLAB-ICE,
>That's not gonna help. 0 threshold is pretty consistent on a plain PIC.
>Also, repeatability is +-2 percent, not linearity. Averaging the values I
>was able to get +-1 degree repeatability in a thermostat this way(using a
>thermistor). This was on several units, I don't think it's a fluke.
What am I missing then?
I use the method you described, charging the cap for several RC periods
till it's pretty much flat.
Then I enter the discharge timing loop, and all I can do is exit when the
pic tells me the pin is low.
The loop is two instructions at 1 MHz, and I'm getting timing values in the
range of 0AXh for 10k, so I've got plenty of resolution, but I see it in
the data, and on the scope, that the discharge termination point (and
presumably the low threshold) is bouncing around like crazy.
I'm not so worried about linearity, at 10k that seems to not be a problem,
but I can't deal with huge variability between measurements when nothing
(intentionally) is changing.
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
In reply to: <email@example.com>
See also: www.piclist.com/techref/mems.htm?key=data
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the