How to use APA102 SPI LEDs with other SPI devices?

I’m working on designing a device using an ATMega32u4 to drive a number of ADA102 LEDs as well as communicate with an RFM69 module. Both of these use SPI, however the ADA102’s don’t use a slave-select pin.

In order to use both of these, I imagine I need to somehow wire this to effectively have a slave-select pin for the LEDs. Any suggestions on how best to do that? I’m thinking that I should be able to use a pin on the arduino to force the data in to the LEDs to ground without also grounding the data in for the RF module. Would something like this work?

D9 ----------------------------+
                               |
MOSI ---+--- <10k resister> ---+----  LED Din
        |
        |
        +---------------------------- RFM69 MOSI

It appears you can use the shiftOut function to control those LEDs.
http://www.arduino.cc/en/Reference/ShiftOut

I think this is the datasheet.
https://cdn-shop.adafruit.com/product-files/2343/APA102C.pdf

I'm not actually concerned with controlling them, the FastLED library will handle that. What I want to be able to do is use the hardware SPI for both driving these LEDs and the RFM69 radio module. I'm just not quite sure how to do that given that the LEDs don't have a slave-select pin to disable them when communicating with some other SPI device..

You must stop the clock pulses, not just the MOSI. Since it doesn't use the MISO line, you could probably use a logic AND IC.

edit: If you use a dual or quad gate 2 input AND IC (like CD4081)
D9 LOW = LED SPI disabled
D9 HIGH = LED SPI enabled

D9 ------+----1A
         |        1OUT-----LED SCK
SCK -----(----1B
         | 
         +----2A
                  2OUT-----LED MOSI
MOSI  --------2B

Hint: If you use a quad gate unit, insure you do not leave the unused inputs floating. Connect them to GND, or how the IC manufacturer recommends.

random_vamp:
I’m working on designing a device using an ATMega32u4 to drive a number of ADA102 LEDs as well as communicate with an RFM69 module. Both of these use SPI, however the ADA102’s don’t use a slave-select pin.

In order to use both of these, I imagine I need to somehow wire this to effectively have a slave-select pin for the LEDs. Any suggestions on how best to do that? I’m thinking that I should be able to use a pin on the arduino to force the data in to the LEDs to ground without also grounding the data in for the RF module. Would something like this work?

D9 ----------------------------+

|
MOSI —±-- <10k resister> —±—  LED Din
        |
        |
        ±--------------------------- RFM69 MOSI

Hi, did you ever get this working, i have come across the same problem wanting to control both APA102 and NFC module.

Oh sorry never mind, Just realised that the apa102 library can use any two pins. Don’t need to have it on the SPI pins.

that simplifies thing a bit.