Skip to main content
Arduino

Return to Answer

Edited change about SPI slaves on the Leonardo.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125

On some boards (like Leonardo, ProMicro - see above) the SS pin isn't exposed (rather it is connected to RX_LED). So people wondered if it wasIt is not possible to remap SS to another pin to be able to use those boards as an SPI-slave. That's not possible slave as the AVR uses fixed SPI pins according to the datasheets (PB0-PB3 on 32U4). You could start to solder of course, but maybe it's easier to use a different board if SPI slave is needed.

On some boards (like Leonardo, ProMicro - see above) the SS pin isn't exposed (rather connected to RX_LED). So people wondered if it was possible to remap SS to another pin to be able to use those boards as SPI-slave. That's not possible as the AVR uses fixed SPI pins according to the datasheets (PB0-PB3 on 32U4). You could start to solder of course, but maybe it's easier to use a different board if SPI slave is needed.

On some boards (like Leonardo, ProMicro see above) the SS pin isn't exposed (rather it is connected to RX_LED). It is not possible to remap SS to another pin to be able to use those boards as an SPI slave as the AVR uses fixed SPI pins according to the datasheets (PB0-PB3 on 32U4).

Complemented answer regarding SPI slave on 32U4 boards without SS exposed.
Source Link

On some boards (like Leonardo, ProMicro - see above) the SS pin isn't exposed (rather connected to RX_LED). So people wondered if it was possible to remap SS to another pin to be able to use those boards as SPI-slave. That's not possible as the AVR uses fixed SPI pins according to the datasheets (PB0-PB3 on 32U4). You could start to solder of course, but maybe it's easier to use a different board if SPI slave is needed.

On some boards (like Leonardo, ProMicro - see above) the SS pin isn't exposed (rather connected to RX_LED). So people wondered if it was possible to remap SS to another pin to be able to use those boards as SPI-slave. That's not possible as the AVR uses fixed SPI pins according to the datasheets (PB0-PB3 on 32U4). You could start to solder of course, but maybe it's easier to use a different board if SPI slave is needed.

Added a comment about the Leonardo and ProMicro not exposing the SS pin.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125

The Leonardo and Micro do not expose the SPI pins on the digital pins, unlike the Uno and Mega. Your only option is to use the ICSP header pins, as illustrated above for the Uno. However the Leonardo and ProMicro don't expose the SS pin and thus cannot be used as an SPI slave.

The Leonardo and Micro do not expose the SPI pins on the digital pins, unlike the Uno and Mega. Your only option is to use the ICSP header pins, as illustrated above for the Uno.

The Leonardo and Micro do not expose the SPI pins on the digital pins, unlike the Uno and Mega. Your only option is to use the ICSP header pins, as illustrated above for the Uno. However the Leonardo and ProMicro don't expose the SS pin and thus cannot be used as an SPI slave.

Added photos of output-only boards based on the MAX7219 chip.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125
Loading
Answered question about why to use SPI.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125
Loading
Corrected spelling of µs.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125
Loading
Tidy ups.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125
Loading
Added more details about multiple slaves.
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125
Loading
Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125
Loading
lang-cpp

AltStyle によって変換されたページ (->オリジナル) /