SPI on Nano?

Hi,

On the Arduino Nano product page it says:

"- SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language. "

However I see there is an SPI.h library available. Does this not work with the Nano?

Cheers,
K

<SPI.h> works with all the '328P based boards, including the Nano.

Awesome, thanks!

Someone should update the product page, I think. It's a bit misleading as it is now...

Agreed. Admin's haven't given Moderators access to those pages tho ...

So I got this working just fine but I have another question: I'm only sending data out from the Nano so the MISO pin (12) is unused. Can I use this as a generic IO pin as usual or does the SPI library get confused?

kbrown:
So I got this working just fine but I have another question: I'm only sending data out from the Nano so the MISO pin (12) is unused. Can I use this as a generic IO pin as usual or does the SPI library get confused?

Alternatively does anyone know of an IC that could convert 8-bit parallel data into SPI serial data?

When the SPI hardware outputs on MOSI, it inputs on MISO at the same time.
You might be able to add
SPI.end();
before using the pin for other stuff, if that works be sure to add
SPI.begin();
before making another SPI.transfer();

Input: 74HC165
Use a SS low/high pulse to capture parallel data before serial read in.

Output: 74HC595
Use a SS low/high edge after serial write out to move data to output registers.

CrossRoads:
Input: 74HC165
Use a SS low/high pulse to capture parallel data before serial read in.

Output: 74HC595
Use a SS low/high edge after serial write out to move data to output registers.

Awesome. Looks like the 74HC165 is what I need. Was running out of IO before but not anymore. Thank you! :slight_smile:

Glad to help.