Electronic – Ethernet RJ45 interfacing with microcontroller

ethernetinterfacemicrocontrollerserial

I am working on a project, (still in the nascent stage) where I have to implement a serial communication interface and an Ethernet interface. I tried to find out as much as I can and got the following information:

  • For the serial interface I can implement using (DB9/DB25 via max232 line driver)
  • For RJ45 interface I am in doubt which method is right. Either:

    1. RJ45 => Ethernet Controller IC => Microcontroller(with SPI)
      would this method interfere with the serial communication port as SPI would require rxd and txd pins of micro-controller which are used to connect with pins of line driver (totally confused)
    2. RJ45 => Micro-controller( I doubt it)

Kindly advise, please forgive my ignorance I am quite new to networking arena.

Best Answer

Your option 2 is only viable if your microcontroller has built in Ethernet hardware. Most controllers don't, but they exist especially at the higher end of the spectrum.

Your option 1 with a separate Ethernet controller is pretty common. You may want to check several open hardware microcontroller boards and get yourself inspired by how they solve Ethernet (and which chips they use). Most of the time circuit diagrams and libraries are fully available, but mind the license that they come with. I know there exist Arduino compatible boards with Ethernet, but I'm not sure of its name.