Go Down

Topic: Mega 2560 + Ethernet (wiz820io / W5200) (Read 2992 times) previous topic - next topic


I've been using an ATMEGA328 with wiz820IO's for a year without issues.  I've recently decided to move to the larger MEGA 2560 to consolidate my controllers - it will do the work of 4 of my old controllers and will save me quite a bit considering each wiz820io is costing me about $20.  Well, I've hooked up the Wiz820io to my new Arduino MEGA but it's not working.  I have everything connected to pins 50-54 but it's not working.  I have the wiz820io on a tiny breadboard so I disconnected the wires on the MEGA, moved them to an UNO and uploaded my program with no changes.  It works perfectly on the UNO.  But nothing on the MEGA.

I don't think I need to reassign the MOSI/MISO/SS pins because this isn't an ethernet shield - I can use any pin necessary.  In fact, after I breadboard this version and have it working then I will have custom PCBs made.

Any suggestions on where to start?



I forgot to mention that I'm using Arduino 0023 and have the latest W5200 files from wiznet's website.  I'm using the 0023 because our product is already out in the market and proven so I don't want to upgrade yet.


I just connected it using the ICSP pins on the Arduino MEGA.  There isn't a SS on the ICSP so I connected it to pin 52 and it didn't work.  I moved it to pin 10 and it still didn't work.


Jun 28, 2013, 10:27 am Last Edit: Jun 28, 2013, 10:48 am by SurferTim Reason: 1
Here are the pins you need to connect on a Mega.

Slave select -> D10
MISO -> D50
MOSI -> D51
SCLK -> D52

edit: Common mistake is connecting the MISO and MOSI lines to the wrong pins. They are kinda "backwards" from the Uno. If you moved
D11 to D50,
D12 to D51,
D13 to D52,
then they are connected to the wrong pins.


I tried all the different pins and was still not able to get it working.  I went to radioshack and bought an ethernet shield with the W5100.  It didn't work either so I downloaded the newest Arudino 1.0.5 and with that had the chatserver example up in no time.  I then tried the example using my 0023 install and it didn't work.  So I downloaded the a fresh copy of 0023 and it worked.  And my code works with that copy. 

I'll see if I can get the W5200 to work now using the ICSP and my fresh copy of 0023 (after updating the libraries per wiznet's site).  I'll post back my results later.


Go Up