Go Down

Topic: Two modules both want MOSI, MISO, & CLK from my Atmega328 (Read 55 times) previous topic - next topic

CosmickGold

THAT'S IT!  Reply #1 below had the answer. Yes, they both have a CS line, and so can share the same SPI pins.   THANK YOU, Dr Azzy!

Question now answered:
I have a radio module, to send data to an SD Card module.
But both modules require the pins on my Atmega328 chip labeled MOSI, MISO, & CLK.
What can I do to make these three items a "happy family"?

DrAzzy

Do they both have a chip select line?

If they do, then you're all good - you can put multiple devices onto an SPI bus, as long as they're all proper SPI devices that don't do anything to the bus if CS isn't asserted, so you just give them a different CS line.
Tiny841 Core: http://drazzy.com/e/tiny851.shtml
Please don't PM me questions or responses to my posts. I am unlikely to see or read them.

oric_dan

This is a very common problem. Various 3rd party libraries do not always play well with each other. There have been a lot of threads regarding this in the "Networking" section, and you might try a search. Eg,
http://forum.arduino.cc/index.php?topic=301481.0

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy