I'm looking at hooking up an SPI device to my Arduino Pro Mini. It's a Mega328. Am I right in assuming that the pins for SPI for the SPI library
are:
MOSI 11
MISO 12
SCK 13
Also, if I use this chip: http://www.cypress.com/?docID=42536 how do I connect the /CS, /WP, and /HOLD pins? Do I connect them to ground since they're '/'?
You should connect /CS (chip select) to the Arduino's SS (slave select) pin. The hardware SS pin is Pin 10 but you can use any pin you like as long as Pin 10 is used as an OUTPUT.
I don't know what the /WP and /HOLD pins do. The datasheet should say what to do with them if you don't need them.
SPI goes to header pins 10..13 on Arduino Undo bds, but to "module"
pins 13..16 on the 24-pin Pro Mini, so you'll have to make sure you have
the right ones.
/CS comes from SS, as John said. The '/' means active-low, so you'll want
to connect /WP and /HOLD high for normal operation, as you don't want to
write-protect or keep the fram in the hold-state.
OK, thanks. I'm not sure how to read your answer; are you saying it's possible to modify the SPI pins? I have pins 3,4,5,6,7,11,12 available. I can move 13 but that would require an additional LED on the final board. I cannot move 8,9,10 as they are dedicated to AltSerial.
SPI are D11-12-13 on any '328 based Arduino. They are hardware in the '328 chip and cannot move.*
The only thing you can do is select a different chip select pin; D10 must be set as an output (and can be connected & used with some other device if you want).
you can mess with pins_arduino.h and give them different names, but that will not change the physical pin will connect to.