Precision

 
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoLog
Author Message
erica
Guest





PostPosted: Mon Jun 09, 2003 1:59 pm    Post subject: Precision Reply with quote

Hi,

I have a ADC11/12 data logger and I am using C program to control it.

How do I increase the precision of the VALUES i get from using the function get_times_and_values? Currently I print out 4 figures e.g. 1250 corresponding to 1.25 V but I would like 1250324 corresponding to 1.250324

I have tried changing the data type in the declaration in the header file from unsigned int to double but doesn't seem to work.

thanx

e Smile
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Tue Jun 10, 2003 10:37 am    Post subject: Reply with quote

Hi,

The values that are returnes by the function adc11_get_times_and_values are a time in microticks (time parameter) and the ADC count (value parameter). The ADC count has to be converted into a voltage. If you are using a version 2 or version 3 unit (this can be found out by using the function adc_get_unit_info) the conversion formulea is as follows:

(A*2.5)/4095

where 2.5 is the maximum voltage measurable. 4095 is the highest ADC count available and A is the measured ADC count. To use this formulea you will get floating point or double precision depending on your variable types.

Best regards,
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoLog
All times are GMT
Page 1 of 1

 


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