[Tinyos-help] ADC sampling rate
Muhammad Azhar
leo_az_83 at hotmail.com
Sat Oct 6 23:14:54 PDT 2007
Hi all,
I understand that the timer used for acoustic ranging done by VU is somewhat different from the original implementation. I've used the timer provided by VU, but I seem to run into problems in obtaining the correct quantity of data when doing acoustic ranging using micaz motes on TinyOS 1.1.15.
As a first step, I decided to see how many samples are actually returned by OutsideRangingSensorM (i.e. I used a counter each time bufferIndex was reset). Hence, in one set of 16 chirps, the counter should return me 16. However, each time a set of 16 chirps has been sent, the counter returns me a value of 3.
As a next step, I reduced the implementation to such that only one set of 16 chirps was sampled each time - again it returns me 3 samples.
Since this program uses ADC.getContinuousData(), I thought that the sampling rate for this ADC was too slow - hence in MicM, I explicitly called ADCControl.setSamplingRate(0) [as this should be the fastest] in StdControl.start(), but unfortunately, it returned 0 samples when I tried running the program. I also tried it out with different sampling rate and this was what I got:
0,1 - 0 samples received
2 - 8 samples received
3 - 7 samples received
4 - 5 samples received
5 - 4 samples received
6 - 2 samples received
7 - 2 samples received
Thus, I'm quite lost as I can't seem to get all the 16 chirps to be sampled. Any suggestions?
Thanks and best regards,
Azhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20071007/aa16e65d/attachment.html
More information about the Tinyos-help
mailing list