Page 1 of 1

adc reading value oscillation

Posted: Mon May 18, 2009 9:42 am
by bmfs
Hi,
I\'m using the function EE_trimmer_get_volt() to read an input signal, using reference voltages of 3 and 0. I found one problem.

The read value is oscillating, for example, for a input signal of 2 V the value read is : 2, 2, 3, 2, 2, 3, 3, 2, 2, 2 (one sample per second, during 10 seconds). what might be the problem?

and can the sensor read, for example, an integer value like 2.2? instead of rounding the value to 2?

thanks,
Bruno Santos

Re:adc reading value oscillation

Posted: Wed Jun 10, 2009 8:29 am
by paolo.gai
Dear bruno,

please check the file ee/pkg/board/ee_flex/inc/ee_board.h

The function is returning a float (32 bit value IEEE floating point) which is computed as \"(adcdata * VREF) / 4096\"

where VREF is \"3.3\", because the demo board uses the 3.3 V power supply.

Please check your code, I guess it is a rounding problem.

Ciao,

PJ