[Tinyos-help] SPI Bus arbitration on micaz
Philip Levis
pal at cs.stanford.edu
Mon Aug 4 09:04:09 PDT 2008
On Aug 3, 2008, at 11:05 PM, Varun Jain wrote:
> Hello Dr.Phil,
> I was looking through the archives and I found that you have
> discussed the topic about using multiple SPI devices. In the
> following link you said that you might post some code for using
> multiple SPI devices:
>
> http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2008-April/032819.html
>
>
> Have you posted it somewhere?? I am trying to attach an LED screen
> to the SPI interface of the atmel atmega128 processor. My platform
> (Chipcons CC2420DBK) is very similar to Micaz and I have ported my
> platform in TinyOS correctly and all the test applications are
> working correctly. I am now building an application where I need to
> display certain data to all the nodes in the network and collect
> data to a BaseStation. So, for displaying I need to attach this
> external LED/LCD screen.
>
> DOES anyone else has used SPI in micaz to interface some external
> devices using arbitration. Will the following process work for this
> task:
> Toggle clock line
> Set the output line
> Send the data from master to slave
>
> Also I wanted to know that if we are using Dissemination to insert
> data into the network every few seconds, then will it be alright to
> use SPI to interface external devices as there might be a conflict
> in accessing the SPI bus.
The micaz does not export the SPI interface via the 51-pin connector:
it is dedicated to the CC2420. The SPI to the at45db is just bit-
banged GPIO. You therefore need to connect directly to the atm128 if
you want to use the SPI. Take a look at the schematic.
For software arbitration, look at platform/micaz/chips/cc2420/
HplCC2420SpiC.nc. You'll see that it connects HplCC2420SpiP's to
Atm128SpiC; the latter provides the power lock to the former. So
that's Atm128SpiC is the component you want to connect to.
Phil
More information about the Tinyos-help
mailing list