PDA

View Full Version : Uncalibrated 16 bit ADC Readings


Jeff4
08-09-2010, 02:41 PM
Hello, we are using the ZICM2410P0 with firmware 2.4.9 and we are trying to use ADC channel 0 to take a voltage reading. The voltage on the pin has been measured as 1.09V. Doing a readADC(0) returns an 8 bit value of 190 which would correspond to a voltage reading of 1.11V using a 1.5V reference.

Now we wanted to try for better resolution using a 16 bit value with readADC(10). However, once we correct the returned value to be unsigned, we end up with a value that is off quite a bit from the 8 bit returned value, and corresponds to a voltage reading of about 0.9V. How is it that the 16 bit reading is much farther off from the measured value than the 8 bit reading? Shouldn't the upper 8 bits of the 16 bit value be the same as the returned 8 bit value? Thanks.

kbanks
08-09-2010, 05:18 PM
We are using CEL supplied routines for the readAdc() functionality, so I am not all that familiar with the underlying hardware.

I do know that the "calibrated" routines take a reading from the low and high reference channels (8 and 9) and than factor that into the adjustments made to the raw reading from the desired analog channel.

The "raw" readings are just that - raw 16-bit readings, with no adjustment AT ALL for what is on channels 8 and 9.

Soem CEL folks lurk on this forum, one of them may be able to provide more specific info.

guonaldo
08-27-2010, 07:18 PM
This is also what i concerned about!

PS: I want to know how to convert a signed integer to unsigned using SNAPpy language?

Thanks
Guonaldo

kbanks
08-27-2010, 09:24 PM
PS: I want to know how to convert a signed integer to unsigned using SNAPpy language?


You cannot. SNAPpy only has signed integers, -32768 to 32767.

You can send the data to Portal (who has full-up Python, not just SNAPpy), and let him deal with it.