Wiring Forum
Other questions >> Other Wiring questions >> SPI interface?

Message started by Titus on 01/12/09 at 16:47:13

Title: SPI interface?
Post by Titus on 01/12/09 at 16:47:13
Hi all,

After some research I found out that a Atmega128 Chip has the 3 nessesary pin's for a SPI interface,

pin's 11-13 on the atmega
thus 25-28 on wiring.

My question is, is this still usable and can anyone help me get started with it? Atm I really lack the knowledge.
What's the clock speed from that pin btw?
Gives me a clue how to connect it, but unlike I2C, there's no library for it.
How does it work and how can I control it. It might be usefull to write a library for it.
There is a arduino library for it though:
Can you just include that in wiring?
After ofcourse changing the pin's to the correct value's?
And I read: "PI clock frequency = system clock / 4" huh? why's that?

I hope that after understanding SPI, I will be able to understand the CC2500 workarround. Some strange things with that thing, has an rx tx too and other strange things?
Another quick thing to ask is: The CC2500(the SPI device we will use) has a maximum of 3,6V for all pin's. Since wiring's output pin's are 5V(or are the spi pin's 3,3 v then ?) this won't work.
Would a 3,3V regulator work like this:?

Wiring Pin ----- 3,3V reg----CC2500 pin

I guess not, but what would be the option for that?

Perhaps it's an Idea to figure this out and documentate it a little, so more people can use SPI with wiring.

Found a spi tut on arduino
Seems the same as the library though



Title: Re: SPI interface?
Post by Vaccumdiode2 on 01/19/09 at 21:32:01
          The Regulator on the output signal will get lost. you will need to use a 3.3v Optocoupler( optical Isolator)  Something simular to the wiring example.  


           You will have to find one where the receiving side is 3.3v.  Check Mouser they have a large selection.

Hope this Helps


Title: Re: SPI interface?
Post by barragan on 01/19/09 at 22:38:11
hi Titus, there are other examples using SPI protocols like this http://wiring.org.co/learning/examples/micromag3-axis.html
the example above can be run in any wiring pins, since the protocol is handled through software, IŽve seen different protocols in different sensors, IŽll look into it (a library using the hardware ISP pins).

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.