this is what I mean
Yes, that's exactly what it is. The reason for the results have been covered in that thread but not a way to end up with a correct pressure reading - which is still kind of hit and miss since we need specific details no the actual sensor used.Is this not a repeat of the left and right output justification as on the previous thread in Richard's link.
/Henrik.
Hi All and Thanks!
Just for grins I took a 10K resistor and fed the A/D input pin with 5 volts. The reading I got was 65472! I had to print and scan the data sheet as the one Servoflo has is similar and does not show the .07 psi device I am using. Not sure why when you print 5 pages to a PDF the text scrambles, its Abobe!I will try the suggest code in a few days. Yes it is a 54A-L07-H-2210 a 5 volt device.
Best, Ed
And this 65472, isn't the 1023 with left justification?
Ioannis
At page 157 of the Data sheet, it is shown that the PIC defaults to ADFM at 0 (zero), so it is really Left Justified by default. You have to make it a 1 for Right Justified result.
The register is the ADCON2 and bit 7.
Ioannis
Yes, because you have the freaking thing configured wrong for the way that ADCIN works for crying out loud :-)Just for grins I took a 10K resistor and fed the A/D input pin with 5 volts. The reading I got was 65472!
Just set the justification bit correct, as Ioannis shows AND as we've already discussed in the other thread where we went thru all this resolution and justification stuff last time.
OK, so it's a 0.07psi and not 7psi as I based my code around..... Well, then we need to change the scaling but lets see if it works at all first.
/Henrik.
that works out pretty nicely every adc 100 count is almost exactly .01 psi
0=110 , 0.07 = 820 couldn't be easier
assuming I read the data sheet properly and that 0.07 psi = 4.0 volts and vref=5 v of course
Last edited by richard; - 25th November 2014 at 07:49. Reason: still can'y type
Bookmarks