ADC42 and Testpoint

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
pontiga
Guest





PostPosted: Fri May 21, 2004 7:33 pm    Post subject: ADC42 and Testpoint Reply with quote

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
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Mon May 24, 2004 8:16 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group