Indeed, the default for the driver is +/-10V. However, the range can be
modified in the driver code. Look at the adc_hwtimer.c file for the constants
ADC_BIPOLAR and ADC_RANGE_10, you should find 2 occurrences of both of these
constants on 2 separate lines. Other valid constants are ADC_UNIPOLAR and
ADC_RANGE_5.
Hope this helps...
Cheers
Phil
--- In Jim Jackson <> wrote:
>
>
>
> The range of the max197 has to be set. There are 4 ranges,
>
> 0 to 5v, -5v to +5, 0 to 10v, -10v to +10v
>
> I suspect the range was set to the latter. This should be explained in the
> manual. I have a simple voltage logger program at
>
> http://www.comp.leeds.ac.uk/jj/linux/adc_logger.tgz
>
> There's an executable which should work on the 7250. It has options to set
> any of the ranges.
>
> Jim
>
> On Tue, 9 Nov 2010, on the horizon wrote:
>
> > Using the driver from the 'Files' repository, a variable voltage supply
> > for testing, and the manual for information; perhaps someone could shed
> > some light on why I am getting these results :
> >
> > If I apply 10v to the proper pins on the Max197 A/D header, the highest
> > value I can observe from cat /dev/adc1 is 2047.
> >
> > The Max197 is a 12 bit converter :
> >
> > 2^12 = 4096 or 4095
> > So, I would deduce that the highest value I could get from the Max197
> > though the driver would be 4095.
> >
> > So, in a nutshell; why am I only getting 2^11 as a maximum value?
> >
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|