Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumOther questionsOther Wiring questions › SPI interface?

Page Index Toggle Pages: 1
SPI interface? (Read 9195 times)
01/12/09 at 16:47:13

Titus   Offline
YaBB Moderator
Wiring Soccer Robot!

Posts: 176
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



Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
Reply #1 - 01/19/09 at 21:32:01

Vaccumdiode2   Offline
Full Member
chicago, IL USA

Posts: 120
          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

IP Logged
Reply #2 - 01/19/09 at 22:38:11

barragan   Offline
YaBB Administrator

Posts: 939
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).
IP Logged
Page Index Toggle Pages: 1