Hello again,

Using the TestADXL345 example in /apps/tests/z1/Accelerometer I got some
numbers for you, basically you can:

- Comment out the delay at /tos/chips/adxl345/adxl345P file in line 787.
- Edit the example and start the Accelerometer only once (in boot only),
then periodically sample 1 axis

As it is the ubr (in /tos/platforms/z1/chips/msp430/usci/Z1UsciP.nc is set
to 800, as SMCLK is sourced from the DCO with /1 divider, this gives a
rough 10KHz clock (I measured this to be actually 9.8724Khz), giving you a
total reading time of 4.84ms (measured just before calling .read() and in
readDone() event).  Changing the ubr to 80 you can get a 87.912Khz clock
(measured), with a reading time of 0.711ms.

Hope this helps.

Regards,

--Antonio


On Tue, Apr 16, 2013 at 10:29 PM, Antonio Linan <[email protected]> wrote:

> Hola!
>
> Yes, there might be room for improvement, if you look at the code it has
> an active waits (around line 787)  that slow the readings but were
> necessary at the time, also one could try and configure the I2C module with
> different settings (UBR for example) to see if more speed is allowed.  I
> have planned a revision of the usci driver, so things may change, in the
> meantime if you wanna dig a little you are welcome, che :)
>
> Saludos!
>
> --Antonio
>
>
>
>
>
>
> On Tue, Apr 16, 2013 at 7:16 PM, Martín René <[email protected]> wrote:
>
>> Sorry that i didn't make the interface problem clear...
>>
>> The accelerometer is digital using i2c interface, and doesn't provide a
>> readstream interface.
>>
>> With another sensor, we reached high sampling speeds using the
>> processor's ADC, but the bus does'nt seem to reach the necessary speeds,
>> maybe delays or something else slows down the sampling...
>>
>>
>> Saludos y muchas gracias!
>>
>> ---
>> Martín René Vilugrón
>> San Carlos de Bariloche
>> Patagonia Argentina
>>
>>
>> On Tue, Apr 16, 2013 at 1:58 PM, Michael Schippling <[email protected]>wrote:
>>
>>> There are some intriguingly named files containing "Stream" and "DMA"
>>> in the ...tinyos-2.x_main/tos/chips/**msp430/adc12 directory. Some of
>>> them even have comments which reference TEP documents that might
>>> explain what they are trying to do. Maybe one of them will allow
>>> you to run the ADC at higher rates...
>>>
>>> In T1 with the mica's (what I know....) one could free-run a single
>>> ADC at low audio rates by bypassing most of TOS.
>>>
>>> MS
>>>
>>>
>>>
>>> On 4/15/2013 1:27 PM, Martín René wrote:
>>>
>>>> We are currently using the Z1 Motes and sampling at 200Hz without
>>>> problems, but we can't raise the sampling speed above said speed without
>>>> starting to have problems. We need to sample at 1000Hz and we can't get
>>>> there.
>>>>
>>>> I know that the resources of the platform are scarse, but i know that
>>>> the ADC can manage those speeds, and as we don't have a analog
>>>> accelerometer we neee to speed up all we can the ADXL.
>>>>
>>>> Is it possible to sample the accelometer at those speeds?
>>>> If it is, ¿how?
>>>>
>>>> Thanks! and saludos
>>>>
>>>> ---
>>>> Martín René Vilugrón
>>>> San Carlos de Bariloche
>>>> Patagonia Argentina
>>>>
>>>>
>>>> ______________________________**_________________
>>>> Tinyos-help mailing list
>>>> Tinyos-help@millennium.**berkeley.edu<[email protected]>
>>>> https://www.millennium.**berkeley.edu/cgi-bin/mailman/**
>>>> listinfo/tinyos-help<https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help>
>>>>
>>>>
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> --
> Antonio Liñan Colina
> R+D+I Engineer
> @: [email protected]
> @: [email protected]
> ------------------------------
> Advancare
> T: +34 93 582 02 70
> http://www.advancare.com
> http://www.zolertia.com
> http://zolertia.sourceforge.net
> http://webshop.zolertia.com
>



-- 
--
Antonio Liñan Colina
R+D+I Engineer
@: [email protected]
@: [email protected]
------------------------------
Advancare
T: +34 93 582 02 70
http://www.advancare.com
http://www.zolertia.com
http://zolertia.sourceforge.net
http://webshop.zolertia.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to