Hi guys,
First of let me thank all of you for your replies. With the details I
got I think I might have to go for the AD option SBC or forget about
AD on SBC and make my own ADC using a PIC.
Anyways, before I make that decision I thought I need to check on one
more thing. In the loop which I read the AD values there is this
usleep(). It was initially set to 10000 and even when the usleep(1)
the same amount of time is taken (20Sec for 1000 Samples -> 50HZ). So
this usleep does not have any effect according to my opinion.
Anyways once I comment usleep() out from the loop the 1000 Samples are
read within 1sec or lees than that. (Now that is 925 Samples per
second). BUT, but :( even when there is no input given to channel 2
the ADC values are not constant. But with usleep in the code the
readings are constant when there is no input on channel 2. (Please
note that I am using channel 2). Anyways then I tried given the input
to channel 2 with two 1.5V battery. Then with usleep in the code all
the 1000 Samples had a constant 3.1### reading. But without usleep in
the code or with nano sleep the reading is varying.
When the readings are constant the sample rate is low. When the sample
rate is good the values vary drastically. I mean the value of the
voltage of the battery goes down to 0.#### Vol. :)
I tried nanosleep but that behaves like usleep was commented. My
kernel in the board is a version 2.4 Kernal.
Anybody has any guesses as to why the ADC values are not constant
when usleep is removed.
------------------------------------
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/
|