W5500 board fails on Mega 2560
General
No replies yet. Be the first to reply.
Join the discussion.
General
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: W5500 board fails on Mega 2560
by Ricky ·
Can you attach the ethernet shield image and code and settings?
RE: W5500 board fails on Mega 2560
by Edward ·
Hi.
You must be used Ethernet2 library of Arduino.
It doesn’t work Ethernet library. it is W5100 target library.
refer to below link.
Maybe 1.8.0 Arduino IDE version is not installed Ethernet2 library.
So, you have to install Ethernet2 library.
path is (Enter to Arduino IDE → Sketch → library manage)
You should be install to 1.0.3 ethernet2 library.
Thank you
RE: W5500 board fails on Mega 2560
by warwound ·
Thanks for the replies.
First let me say that i think the problem is related to SPI and not the ethernet library being used.
Let me explain…
I have installed the Ethernet2 library and tried this example sketch:
The sketch works with my W5500 Ethernet Shield on a Uno but fails on two different Mega 2560s.
On the Mega 2560s the sketch always hangs at:
I’ve left the sketch running for many minutes many times but the call to Ethernet.begin always fails to return.
Now i also have the SdFat library installed and am trying this example sketch:
The sketch works fine on a Uno but again fails on both my Mega 2560s.
It logs an error code 0x20, which i can’t find any reference to in order to understand the error.
On both example sketches i have added some additional code to set the Mega slave select pin as an output:
The Sdfat example sketch contains code which can be used to disable any secondary SPI device attached:
So i changed -1 to 10 in order to disable the ethernet controller while running the SdFat example.
Now is the problem a hardware fault with both of my Mega 2560s?
I think not - a colleague has also tried another W5500 Ethernet Shield on his Mega 2560 with the same failure.
Note also that all three Mega 2560s work fine with a Arduino Ethernet Shield 2.
Other SPI devices work fine on all three Mega 2560s.
Is the problem a hardware fault of the W5500 Ethernet Shield?
I think not - we have two shields and both fail on Mega 2560s but work on a Uno.
I’ve attached my modified version of the Ethernet2 DhcpAddressPrinter.ino sketch.
DhcpAddressPrinter.ino.hex (1.3 KB)
Rename DhcpAddressPrinter.ino.hex to DhcpAddressPrinter.ino, the forum wouldn’t let me upload a .ino type file.
RE: W5500 board fails on Mega 2560
by warwound ·
I’ve made some progress and the ethernet part of the shield is now working.
I simply jumpered the shield ICSP pins to the Mega ICSP pins and then jumpered pin 10 from shield to Mega.
(I thought i’d done exactly this previously but am not sure).
So ethernet works.
I then jumpered pin 4 from shield to Mega.
Ethernet still works - with and without an sdcard inserted into the shield.
However all sketches fail to access the sdcard part of the shield, they still fail as before with the SdFat example showing error code 0x20.
The sdcard sketches i have tried all set the Mega SS pin to OUTPUT mode HIGH and ethernet CS pin 10 to OUTPUT mode HIGH.
I shall experiment more but if anyone has any suggestions i’d be glad to read them.
Did Wiznet ever fix that buggy implementation of SPI in the W5000 chip or is that still a problem with the W5500 chip?