I purchased an Ethernet Shield, and I haven't used it yet.
I notice it plugs onto the top of all the pins on the Arduino, does this mean it uses all of them? Can I no longer use them for my own use? I presume it isn't using them all, only some of them. Which pins can I no longer use?
Those pins are passthrough. this means that you can connect to any pin and plug other shields on top but you need to check the documentation to see which pins are used by the board.
Duh, nevermind. I found it: Arduino uses digital pins 11, 12, and 13 (SPI) to communicate with the W5100 on the ethernet shield. These pins cannot be used for general i/o.
According to the schematic, those go to pins on the SD card socket. If you don't have an SD card in the socket, there should be no electrical connections to those at all.
strange. wild guess here: glancing at the library code, they seem to access the port directly. Is your pinMode for pins 8 and 9 set before the Ethernet library setup? if so, move it to after.
The troubling bit is PORTB = SPI0_SS_BIT. I think this is the problem.
Perusing the rest of the code, it appears that this gets executed every time the library talks to the chip. So, I'm gonna take a wild guess that the pin does get turned on, but gets turned off the next time you make pretty much any Ethernet library call.
If I'm right, this is a bug. SPIO_Init() should not set those two lower bits that are not in use by the device.
This may not be the whole problem, as those PORTB pins may be misued in other places (e.g. setting DDRB, more instances of setting PORTB, etc).
In the mean time, you can try this fix: go to your arduino software install directory. Edit hardware/libraries/Ethernet/utility/spi.h and change the line
PORTB = SPI0_SS_BIT;\
to look like
PORTB |= SPI0_SS_BIT;\
note the change is the operator, |= instead of =. Once you make the change, remove all the .o files in hardware/libraries/Ethernet/utility and hardware/libraries/Ethernet to force a recompile of the Ethernet software.
Try that and get back to us. If one of the developers hasn't noticed and jumped in pretty soon, I'll log a bug in the software "bugs" forum.