[Tinyos-help] ADCC question
Michael Schippling
schip at santafe.edu
Fri Sep 15 12:51:19 PDT 2006
Since no one has volunteered real information I'll supply some opinions...
I had trouble, which I did not debug, with using a 1ms timer on micaz
(it worked fine on mica2) to drive sequential ADC conversions. You might
try some values from 1-10 to see if it matters to you. Also make sure
that you are not doing something else that would mask the timer or ADC,
like sending a packet for each sample.
I can't find an example of getContinuousData() use, but I assume,
and sort-of verify from a brief viewing of the mica2 code, that it
will start a new conversion as soon as one finishes. This should
make the ADC pre-scaler the master of sample timing. On the
mica2 I would expect to get around 3000 sample/sec at the slowest
prescale value. I believe the tmotes use a different micro-controller
so you should look at it's manual for ADC timing advice.
Again for the mica's, there is a lot of shuffle in the ADC code that
_might_ indicate that there is some channel queuing going on, such
that you could start up getContinuousData()'s on each of your sensors
and the system might sort it out for you. That is an exercise for the
reader to verify on his or her own...
My posted code contains an example of doing what you are doing on
the micas if it is of any help:
http://www.etantdonnes.com/Motes/robocode.tar.gz
MS
lamiaimeil wrote:
> Hi all,
> I have a question on ADC.getContinuousData. In my
> progect I have 4 sensors mount on Tmote sky and I want
> to get data from them periodically. I have set a timer
> and at every Time.fired() I switch from a case
> structure for get data of a different sensor. The
> problem is that this way seems very slowly: I set
> Timer2<TMilli> at 1 so in 1 second I must have about
> 1000 data but I have only 100. The time for wake up a
> sensor, get data from it and send the ADC.dataReady
> seems to be 10 ms. So I try ADC.getContinuousData for
> avoid wake up the sensor every time and with it I have
> about 1000 data at second. The problem is that the
> switch case don't work because ADC.getContinuousData
> continue to work on the same sensor. How can I do to
> switch the sensor using ADC.getContinuousData? And how
> can I get out of all ADC.getContinuousData? When I
> have data from all 4 sensors I want save them and I do
> a task for do it but in ADC.getContinuousData, the
> command post MyTask() doesn't work!!
> Thanks in advance.
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
More information about the Tinyos-help
mailing list