Mega with Ethernet shield hangs on startup



  • Have a couple of each (2 mega's 2 shields), tried all four combinations with and without wireless module attached.

    They all seem to have the same problem on startup, they never return from the following line in Startup():

     "gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);"
    

    I know theres a thread targetting the Mega as being unable to support the power requirements, but i find it odd that I can run a simplistic web server sketch and if I comment out the gw.begin() the ethernet controller script runs much further (albiet useless without the wireless...).

    It seems to be a common combination - i.e. Mega with ethernet shield and without the wireless attached it's not drawing any extra power..

    Any thoughts? I'm way out of my depth here. I can code but no real idea of the connectivity etc. that's used with Arduino's.

    i did spot this page: http://arduino.cc/en/Main/ArduinoEthernetShield which implies that with a Mega different IO pins are used, however that doesnt make sense to me (because the shield still fits over the same pins as the uno). However more interestingly it talks about the following:

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

    Assuming the pin numbers aren't changed does the comments about the SS pin point to a particular conflict with the gw.startup? I do have an unused SD card slot.

    I'm really keen to get this going, the extra memory space on the mega will be invaluable for my development.

    Atomic.


  • Admin

    Having similar problems here:

    TMRh20/RF24#24



  • Trying to follow the thread behind that bug. Which combo worked for you in the end? It's all very confusing 😞



  • Still digging away here, and confused by what I see as a conflict regarding the physical layout of the ethernet shield and the documentation when used with the Mega.

    The physical layout (http://shieldlist.org/arduino/ethernet-v5 for example) clearly shows the range of connectivity, when combined with a mega (http://www.onemansanthology.com/images/arduino/Arduino-Mega-2560-with-ethernet-shield-1024.JPG). It's clear that the high end IO pins are not connected.

    The documentation however states that when combined with a Mega that the ethernet shield uses different IO pins for communication (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 10, 11, 12, and 13 on the Uno 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"

    How does the shield/mega combo achieve this? or is it simply a documentation flaw? and is it potentially the reason for the hanging I'm experiencing due to misconfiguration.?

    I'll play around tonight with the mega stated io pins to see if it works.


Log in to reply
 

Suggested Topics

  • 3
  • 6
  • 2
  • 6
  • 1

11
Online

11.4k
Users

11.1k
Topics

112.7k
Posts