Go Down

Topic: Two modules both want MOSI, MISO, & CLK from my Atmega328 (Read 80 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.

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