|
|
| Author |
Message |
pontiga Guest
|
Posted: Fri May 21, 2004 7:33 pm Post subject: ADC42 and Testpoint |
|
|
I am trying to use ADC-42 with Testpoint software. Therefore, I have followed carefully the instructions given in the example
http://www.picotech.com/testpoint.html
To addapt that example (which was written for ADC-40) I have changed the call to open the unit to
"call adc10_open_unit with 1, 42"
However, I miss in the example the formula corresponding to the settings of the math object "adc->volt". I have therefore set "adc->volt" simply as "x". Unfortunately, this does not work, since I always get wrong readings of the voltage. For example, when I apply 0 volts, testpoint reads 2050. When I apply 1.456 volts (LR03 battery), testpoint reads 2661.
Any help? Thanks in advance.
Francisco Pontiga |
|
| Back to top |
|
 |
markspencer Site Admin

Joined: 07 May 2003
Posts: 610
|
Posted: Mon May 24, 2004 8:16 am Post subject: |
|
|
Hi,
I am sorry to hear that you are experiencing this problem.
Believe it or not but the answers that you are getting are correct, but they are being displayed in ADC counts. The ADC-42 is a 12 bit bipolar unit that measues up to 5 volts on both rail. To convert the ADC counts to a voltage reading you will need to insert the following:
| Quote: | Formula
v = (5 * (x - 2048)) / (4096 - 2048)
v : Voltage
x : ADC count
0 Volts : 2048 ADC counts
-5 Volts : 0 ADC counts
+5 Volts : 4095 ADC counts
|
Best regards, |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|