Change SS pin for USB Host Shield

Hello everyone,

I want to change the SS pin for SPI interface of the USB host shield, let's say to pin 4. Reason is that I will also use the Ethernet shield which use pin 10 as SS.

This is not a new issue, and I've read a few resolutions, and decided to go with this post, (under Interface modifications).

In the UsbCore.h, change:
typedef MAX3421e<P10, P9> MAX3421E
to
typedef MAX3421e<P4, P9> MAX3421E

But for hardware, i did a bit different (photo is attached):a jumper from pin 4 -> pin 10 on the USB host shield, and left open pin 4 of the shield to pin 4 of arduino.

I thought this setup would work, but it failed the board_qc sketch with:

Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register... Die revision invalid. Value returned: FF
Unrecoverable error - test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test

which indicated there was problem of

Shield with shorted or unpowered SPI

Yes, it had worked with unmodified library. And yes, I did restart the Arduino to force to use the new library.

Am I missing something here? Any help is very much appreciated.

Thank you,
Danny.

Looks like the wrong pin is bent/disconnected. As far as I understand the USB host software is configured to use pin 4 for SS but the picture shows pin 4 is bent so it is not connected to the Uno. This means the Uno cannot control pin 4. Try bending/disconnecting pin 10. This prevents the USB host shield from using pin 10.

Stacking order is important. Put the Ethernet shield between the Uno and the USB host shield.

gdsports:
As far as I understand the USB host software is configured to use pin 4 for SS but the picture shows pin 4 is bent so it is not connected to the Uno. This means the Uno cannot control pin 4.

Nice, I got it to work now, but I'm not sure I fully understand the logic here:

Isn't it the default SS pin on UNO is pin 10? so shouldn't the SS line goes from pin 10 (UNO) --> pin 10 (Shield) --> pin 4(Shield) (which is modified to be SS pin in shield library)?

One possible explanation: shield talks with the UNO first, and lets it know about shield's SS pin, and UNO change it accordingly?

The Ethernet shield and the usb host shield both use a different pin for the SS line. Every SPI device requires its own pin on the arduino for the SS line. Pin 10 is just the default pin. The SS pin is the chip or slave select, sometimes you will see it labeled as CS or CSN. The arduino uses this pin to enable the SPI device so it can communicate to the SPI master (the arduino). If you have multiple shields wired to the same pin defined as SS, you could have multiple devices trying to communicate to the arduino at the same time.

You can use any other pin for the SS line, but the default SS pin (10) must stay an output. If you use pin 10 as an input for something, then the arduino will not be the SPI master.