Test and Measurement Forum

ADC42 and Testpoint

Post general discussions on using our drivers to write your own software here

ADC42 and Testpoint

Postby pontiga » Fri May 21, 2004 7:33 pm

I am trying to use ADC-42 with Testpoint software. Therefore, I have followed carefully the instructions given in the example


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

Postby markspencer » Mon May 24, 2004 8:16 am


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:


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,

Mark Spencer
User avatar
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest