Greetings, all.
With the kernel module issues handled, I only have one (hopefully) last
remaining hardware issue to deal with. Namely, the A/D converters.
I am using a slightly modified version of the adc_7250.c sample/example file
(http://www.ve3syb.ca/tmp/adc_7250.c) that shows how to read the A/D
converters. It seems to work fine when I run it as a standalone test program
(ie. define TESTPROG) but not when I use it in my application.
The A/D voltages from all five channels seem stable when I run the test
program from a command line. I run it multiple times by hand (using command
line recall). The voltages displayed by ./adc_7250 are stable give or take
minor variation around the third decimal point.
When I call the ADC_ReadAllChannels() routine once per second in my
application, the voltages I read are unstable. They are all over the place. I
may get one or two readings in a row that are about what I expect. Other times
they can be negative or up to 4V.
The sample file must be missing something regarding the control of the A/D.
I'm wondering if someone can spot what it is. I'm still trying to look over
the A/D info from the EP9301 manual.
Is the problem in the check for whether the A/D is busy (ie. in the middle of
a conversion)? I saw some note about needing to check for a low to high (?)
transition on the busy bit. Haven't had a chance to test that yet. Even still,
it is odd that the routines work reliably when I run the program from a
command line to poll the A/D's.
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
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/
|