I am trying to see if I can use a slave select pin other then pin 10 to control an Ethernet Shield (R3). My end goal is to take an Ethernet shield and connect it to a
panStamp (this is like an Arduino Pro Mini 3.3v Atmega328 with RF chip). The panStamp uses SPI to communicate with the RF chip and it's hard wired to use pin 10 for SS.
As a test just to see if I could get an Ethernet shield to work using a different SS pin, I took a Duemilanove and connected it to a Arduino Ethernet shield R3. I didn't plug the shield into the headers, I just used wires to connect the two. I had pin 10 on each connected, then pins 11-13 on the Duemilanove wired to the SPI connector on the shield. Plus 5v and Gnd. This setup worked fine and I could use the Ethernet shield to upload to cosm.com.
I did some research on changing the SPI pin and found this
forum post which was pretty informative. Basically he says to change modify 5100.h file. So I changed
inline static void initSS() { DDRB |= _BV(2); };
inline static void setSS() { PORTB &= ~_BV(2); };
inline static void resetSS() { PORTB |= _BV(2); };
to
inline static void initSS() { DDRB |= _BV(0); };
inline static void setSS() { PORTB &= ~_BV(0); };
inline static void resetSS() { PORTB |= _BV(0); };
This should change to SPI from pin 10 to pin 8.
For my test I connected pin 8 on the Duemilanove to pin 10 on the Ethernet shield. But I couldn't get the Ethernet shield to work with this setup. I also tried to set pin 8 low in my sketch with digitalWrite() before I made an Ethernet call, but that didn't help. Is it even possible to use a pin other then 10? If so, are their certain pins that will work and others that won't? I'd appreciate any suggestions in getting this to work.