No /SS signal using SPI on 0022 system

This is a new topic about an old subject. I have a Mega1280 that compiles fine and works with a WIZ812MJ module. When I upgraded to 0022 (from the working 0018) everything stopped working (wouldn't compile) because of SPI issues. I seem to have these resolved now but even after a successful compile, the module no longer works. I have tracked this down to the /SS pin (chip select) of the SPI interface. I have my clock and data going out but /SS stays high. If I go back to 0018, it all seems to work fine.

I need to get this working under 0022 since I developed with the Mega1280 and when we were ready to put it into production, we could no longer buy the 1280 and received instead the Mega2560 instead which required the 0022 system. Has no one else seen this problem? I also use the eeprom routines which as I understand it also use the SPI interface so my problem could be in this area as well.

Lastly, if someone could point me to the actual source code for the ethernet and eeprom library code, I might be able to troubleshoot this myself. ANY advice or pointers would be greatly appreciated.

len

The current Ethernet library works with the Ethernet shield which uses Pin 10 for /SS, EVEN ON THE MEGA. If you are expecting the Slave Select on the hardware SS pin (53?) you will be out of luck. Try connecting it to Pin 10.

John,

Thank you very much for this tidbit. Can you tell me where this change was documented? I'll have to re-lay out my PCB but I wasn't using pin 10 anyway so it should be easy to do. Do you have any idea if they are ever going to switch it back to pin 53? I'd like to know so I can put a jumper on my board to handle either case.

len

Release notes for ARDUINO 0019 - 2010.09.03

  • Revised Ethernet library (by Christian Maglie). This depends on the
    new SPI library, so existing sketches will need: #include <SPI.h>
    added to the top of their code.

(No way of knowing if the Ethernet Shield design will change again or if the library will change to allow a different /SS pin.)

FYI:

"Arduino communicates with both the W5100 and SD card using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Duemilanove and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general i/o. On the Mega, the hardware SS pin, 53, is not used to select either the W5100 or the SD card, but it must be kept as an output or the SPI interface won't work."

Thanks again, this explains it all. I completely skipped over 0019 and so I missed the SPI.h change. Everything is working great now.

len