Author Topic: What Ethernet controller to use with Atmega2560  (Read 2237 times)

0 Members and 1 Guest are viewing this topic.

Offline Sammy54322Topic starter

  • Newbie
  • Posts: 3
  • Country: gb
What Ethernet controller to use with Atmega2560
« on: March 21, 2017, 09:50:36 pm »
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.
 

Offline Lovely_Santa

  • Contributor
  • Posts: 42
  • Country: be
Re: What Ethernet controller to use with Atmega2560
« Reply #1 on: March 21, 2017, 10:14:16 pm »
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 much ;)

But 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
English is only my 3th language, so don't tell me my english is bad, becose I know that, I try to do what I can...
 
The following users thanked this post: Sammy54322

Offline Sammy54322Topic starter

  • Newbie
  • Posts: 3
  • Country: gb
Re: What Ethernet controller to use with Atmega2560
« Reply #2 on: March 21, 2017, 10:39:40 pm »
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
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26878
  • Country: nl
    • NCT Developments
Re: What Ethernet controller to use with Atmega2560
« Reply #3 on: March 21, 2017, 10:40:37 pm »
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.
« Last Edit: March 21, 2017, 10:43:57 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Sammy54322Topic starter

  • Newbie
  • Posts: 3
  • Country: gb
Re: What Ethernet controller to use with Atmega2560
« Reply #4 on: March 21, 2017, 11:41:18 pm »
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
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: What Ethernet controller to use with Atmega2560
« Reply #5 on: March 22, 2017, 02:38:33 am »
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.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf