Yes, what pedja089 said. The only clue you provided is 54AL07H2210 which returns nothing on Google.
And, I have a feeling we've been thru this before..... The PIC ADC has a resolution of 10 bits, it returns values ranging from 0 to 1023.
/Henrik.
Yes, what pedja089 said. The only clue you provided is 54AL07H2210 which returns nothing on Google.
And, I have a feeling we've been thru this before..... The PIC ADC has a resolution of 10 bits, it returns values ranging from 0 to 1023.
/Henrik.
Sorry guys. The PDF was too large (22 pages as it had all the devices in the series) so to upload so I had to make it smaller! Yes it is a 0.5 - 4.5v type ratiometric device. My A/D is showing a reading of 7040 at zero psi and when I do a divide by 16 I get 440 which I am assuming means .440 volts? With a voltmeter I see .541 volts so now I have not been able to make any sense of all of this. My best guess is that this would indicate a voltage range of .440 to 4.440? Where .440 is zero and 4.440 would be at .07psi? If the A/D were 10 bit and giving 1023 as a maximum value then a reading of 7040 could not be possible. I am just so totally lost and confused with so many numbers! I just completely do not understand!Thanks!
its just like de ja vou again
http://www.picbasic.co.uk/forum/show...578#post128578
Yeah, deja vu indeed....
Ed,
* The resolution of the ADC is 10 bits.
* It does not return a reading directly in Volts.
* Basically it takes the difference between Vref+ and VRef- and divides that by 1024 (2^10, the resolution of the ADC). Each "count" in the value is then "worth" that amount.
So, if VRef- is GND (0V) and VRef+ is 5V the difference between the two is 5V. Each "count" in the ADC result is then "worth" 5/1024=4.88mV.
If the ADC returns 745 the voltage at its input is 5/1024*745=3.638V
I can't make out anything from that datasheet, it's just garbage numbers when viewed on my machine. I managed to find this one. And, I'm guessing you've got the 7psi sensor, correct? If so then something like this might work. I have not tested it though so all bets are off....
Of course you need to configure pins etc as usual (!)
/Henrik.Code:Accumulator VAR WORD i VAR BYTE ADResult VAR WORD Accumulator = 0 Main: For i = 0 to 39 ADCIN 4, ADResult Accumulator = Accumulator + ADResult PauseUs 500 NEXT ADResult = Accumulator / 10 ' Psuedo 12bit resolution, ADResult is now 0-4092 ' Sensor outputs 0.5V (ADResult=409 ) at 0psi (nominal) ' Sensor outputs 4.5V (ADResult=3683) at 7psi (nominal) ADResult = ADResult - 409 ' Offset for zero output, ADResult is now 0 to 3274 for 0 to 7psi ADResult = ADResult */ 547 ' Scale up, ADResult is now 0 to 6995 for 0 to 7psi ' Display Pressure: x.xx psi HSEROUT["Pressure: ", DEC ADResult/1000, ".", DEC2 ADResult//1000, "psi", 13] PAUSE 1000 Goto Main
PDF works for me.
The sensor is a 0.07 psi low voltage range with output from 0.5-4.5V
Steve Earl www.datageo.co.uk
that makes it a "54A L07H2210" not what was posted , its best to be sure
steve can you read the characteristics in the data sheet ,that what comes out garbled for me
Last edited by richard; - 24th November 2014 at 09:57.
'* Notes : For a 18F1320 and 54AL07H2210 *
was it not?
Steve Earl www.datageo.co.uk
Is this not a repeat of the left and right output justification as on the previous thread in Richard's link.
7040 left justified is 110 right justified using Henrik's 4.88mV then
110*4.88/1000=0.5368 V
Or put another way 7040/64=110 which shifts the 10 bit left justified result 6 bits to the right making the result the same as a right justified result.
Steve Earl www.datageo.co.uk
Bookmarks