I am very confused about how the A/D works on the 7250. Reading the Linux
Developers
Manual it talks about an a2d_driver.o, which is not present in the
lib/modules/kernel
hierarchy nor in the source tree for ts11.
There is a helpful example here, the adc_7250 program, which works as
advertised, using
direct memory access.
The description in the 7250 Manual, and the EP9301 User Guide, implies that you
read in a
32 bit value and must blank off all but the lower twelve bits. (0xFFF).
The adc_7250 program masks off 16 bits, using 0xFFFF, and include logic like
this:
if(avg < 0x7000)
avg = avg + 0x10000;
if(virgin == TRUE) //use approximation
{
avg = avg - 0x9E58;
val = ((double)avg * 3.3) / 0xC350;
}
I am getting raw values like this:
0.2V 40921 0x9fed
1.6V 248 0xf8
3.3V 25122 0x6222
The above C code converts the raw values, but I don't understand why. Surely
the raw
values should go from 0x000 to 0xfff, from 0V to fullscale?
What am I missing?
Thanks in advance,
Martin
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|