[En-Nut-Discussion] Analog inputs

Paolo Corno paolocorno at mac.com
Tue Mar 20 15:16:49 CET 2007


Hi all
I have tried almost all the features of ethernut 2.1 and i can manage them, the only problem is that I am still not able to get any resukt from analog channels.
I have some questiuons:

let's suppose that i have a constant vlotage source e.g. 0.8V

1) If I do not apply any voltage reference I suppose that the measured range is 0-5 V. Is it correct?

2) If I want to measure a different range how can I do it? Is the analog reference a shift for the 0 value? So if I Apply 1V to the reference voltage do I measue ona a -1 to 4 V scale? If I want to measure a range from -0.5 to 1 V do I have to amplify the signal to 0-5 or do I have any smarter way?

3) Is it enaugh to connect +signal to PF0 and -signal to AGND to obtain a suitable reading? Do I need to connect also the signal ground to another ground using a bias resistor?

4) Do someone have a simple example code? I found many different examples but I always get almost random values in the range 0-1024 so the variation is too wide to let me think that it is only noise.

Thank you




More information about the En-Nut-Discussion mailing list