What Ethernet controller to use with Atmega2560 - Page 1
Forum section: electronics / general

author: Sammy54322
author_rank: Newbie
timestamp: March 21, 2017, 09:50:36 pm
content: I currently have a circuit to turn on lights using either a Ethernet connection or a button. I have two boards: a button board with the buttons and LEDs for turning on the relays and indicating whether the relays are turned on and the other board is a logic board consisting of an Atmel Atmega2560, 4 relays with drivers, a 5V and a 3.3V power supply and a set of headers for the button board.All of the schematics have been fully made to the above specifications, and I have an ENC424J600 which uses the SPI protocol which I don't want to use and I want to use the I2C protocol because I have experience with using it before. I really like the datasheet for this chip since it has example schematics in the datasheet and I have used them to construct the schematic but now that I want to change the Ethernet controller to one that can use the I2C protocol and I can't find one with a datasheet that has these example circuits, so if anyone knows an Ethernet controller with the schematics in the datasheet or if they have any ideas of what chip to pick that has example schematics then that would be greatly appreciated.

author: Lovely_Santa
author_rank: Contributor
timestamp: March 21, 2017, 10:14:16 pm
content: Some time ago I started using serial communications... So my first IC's that I used where SPI interfaced ADC's... But then I wanted to connect it to usb... So I had to change to I2C... In the beginning I used an SPI to I2C converter.. But afther a while I learned I2C becose I wanted the knowhow..So I would suggest, just get familiar with SPI and learn it! You can never know too muchBut to answer your question: I looked on the web a bit.. But couln't find any ethernet controlles with I2C interface.. But I came up with 2 other sollutions for your ENC424J600 ethernet controller:First one you could guess: I2C to SPI converter: SC18IS602B should do the job perfect without any issue...The other sollution if you don't want to use the SPI, is driving your ethernet controller directly.... So parallel... And yes.. get an IO expander, driven I2C based...Hope this is a start?Lovely Santa

author: Sammy54322
author_rank: Newbie
timestamp: March 21, 2017, 10:39:40 pm
content: Thanks for the quick reply there, I'm probably going to go with the I2C to SPI converter for this project as I'll be making other devices similar to this for different devices and as you say you can never know too much so I'll definitely learn the SPI protocol soon (exams will be over so lots of time in the summer holidays) and the parallel interface option is probably not going to be an option as that takes a lot of space for an I/O expander and this board has to fit inside a one gang light switch (approx. 70x70x45mm LxWxH) and this is just the bare minimum for this device so more will almost certainatly be added to it in the near future. So thanks for that because I would have spent so long looking for an Ethernet chip that doesn't exist or some other convoluted idea and not only is what you suggested a start; it's also a solution to the problem.Thanks so much for that,Sammy

author: nctnico
author_rank: Super Contributor
timestamp: March 21, 2017, 10:40:37 pm
content: Another option is the Wiznet W5500. It also has an SPI interface (I2C is just too slow for ethernet) and it does UDP and TCP/IP for you so less software to deal with.

author: Sammy54322
author_rank: Newbie
timestamp: March 21, 2017, 11:41:18 pm
content: If I do use the Wiznet W5500 then how would I go about using it with an RJ45 jack with built in magnetics (what other components would I need) and less software is definitely a plus since I want to keep everything simple. Also how would I connect the W5500 to the Atmega2560 with a ICSP header, any schematics for this sort of thing would really help

author: senso
author_rank: Frequent Contributor
timestamp: March 22, 2017, 02:38:33 am
content: Been using the W5500 for a long time with the recommended Magjack(its in the datasheet/design files for their eval board), and their lib is a major clusterfuck!Corrected dozens of bugs, it works half ok in an home network, put it into a enterprise network and oh boy, traffic makes it crazy lol.