Pages: [1]   Go Down
Author Topic: No /SS signal using SPI on 0022 system  (Read 522 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 203
Posts: 8720
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 203
Posts: 8720
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 203
Posts: 8720
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI:

http://arduino.cc/en/Main/ArduinoEthernetShield

"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."
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: