I'm trying to use one Arduino nano every for both a MAX7219 LED matrix and an nrf24l01+ module to wirelessly communicate with another board. However, both use SPI and therefore need pins 13 (SCK), pin 11 (MOSI), and pin 10 (SS).
I read that the ICSP pins include these and so this could be a workaround, but I haven't been able to find any example code for how to programme them. I also read that a I2C could be a way to do this, but I don't understand what I2C is at all. Does anyone know the best way to do this?
Any help or suggestions would really be appreciated.
You connect the SCK, MISO AND MOSI pins of the devices together (using soldering or a breadboard) and then connect them to their corresponding pins on the Arduino.
The image attached shows how you would connect the MOSI pins
Thanks that's really helpful I've been looking for ages and couldn't find any practical info.
Just out of interest, how come the signals don't get mixed up if they're using the same pin?
nicohsmith:
I read that the ICSP pins include these
Just an FYI, unlike the classic Nano, the Nano Every doesn't have an ICSP header. Even on the classic Nano, the ICSP header is connected to the same microcontroller pins as the header pins 11, 12, and 13, so electrically there is no difference. It doesn't provide a second SPI bus. It's just a convenient way to connect an ISP programmer. Since the Nano Every's ATmega4809 is programmed in a different manner (UPDI), an ISP header wouldn't really be so helpful.