Go Down

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


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"?


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.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy


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,

Go Up