---
title: "Different ways to add Ethernet Connectivity to Embedded System"
url: "https://maker.wiznet.io/scarlet/projects/different-ways-to-add-ethernet-connectivity-to-embedded-system/"
markdown_url: "https://maker.wiznet.io/scarlet/projects/different-ways-to-add-ethernet-connectivity-to-embedded-system/md"
type: "UCC: User Created Content"
author: "eXtremeElectronics"
author_url: "https://www.youtube.com/watch?v=uN64LHcy1tQ"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "eXtremeElectronics"
original_url: "https://www.youtube.com/watch?v=uN64LHcy1tQ"
published: "2023-05-31"
language: "en"
likes: 0
views: 215
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Different ways to add Ethernet Connectivity to Embedded System

> In this tutorial I will discuss what options you have when you want to add Ethernet Connectivity to Embedded Systems. Like ENC28J60, W5500 o

Original author: eXtremeElectronics (source: https://www.youtube.com/watch?v=uN64LHcy1tQ)

## Article

[00:01](https://www.youtube.com/watch?v=undefined&t=1s)

so in this video we will see that in how many ways you can create an embedded device that can connect to the ethernet so the very first and the most costly option is to choose an stm32 microcontroller that has inbuilt ethernet controller uh that means stm32 microcontroller that has inbuilt ethernet Hardware so this is the first option but only very high in stm32 microcontrollers have inbuilt ethernet so this will be going to be a very costly option because the main stm32 microcontroller will be costly compared

[00:35](https://www.youtube.com/watch?v=undefined&t=35s)

to other microcontrollers and the second option the second option you have is to use a microcontroller that does not have any ethernet controller built in and we add an external ethernet controller so many external ethernet controller chips are available and uh among these the first option is the enc28 j60 chip which has an SPI interface to the host that means it connects to your microcontroller using the SPI port and it has an Ethernet connectivity so you can use this chip and this chip and this ship is a very low cost chip

[01:10](https://www.youtube.com/watch?v=undefined&t=70s)

and very low pin count chip and very simple to use but the problem is that this chip is only limited to 10 Mbps ethernet and if you need uh if you if you are making any device that need a higher speed communication like the 100 Mbps ethernet then obviously we cannot use this chip that is ENC 28 j60 and another option is to use one more very popular chip and this chip is the w5500 chip so what is the main difference between this w5500 chip and this ENC 28 j60s chip so the thing is that this ENC 28 j60 it is a bare ethernet controller chip it

[01:51](https://www.youtube.com/watch?v=undefined&t=111s)

does not have the TCP stack built into the microcontroller so we have to choose a microcontroller that can run a this TCP stack then only we will be able to use this chip on the other hand the w5500 chip it has inbuilt this TCP support so the TCP stack actually runs inside this w5500 chip not your microcontroller so the main difference between the w5500 chip and the ENC 28 JC 60 chip is that uh the w5500 chip has in which PCP stack but on the other hand our ENC 28j60 is a relatively simple chip so it doesn't has this TCP stack

[02:34](https://www.youtube.com/watch?v=undefined&t=154s)

built in so it's our responsibility to run this TCP stack on the microcontroller so when you are using a relatively high-end microcontroller that has lots of ram then it is advisable to use this ENC 28 j60 as a ethernet controller because this will be more flexible because you are running the TCP stack on software so you can configure everything so this will be relatively our highly configurable Solution on the other hand this w5500 chips it has inbuilt TCP stack so it can be interfaced with a microcontroller that has very small

[03:07](https://www.youtube.com/watch?v=undefined&t=187s)

amount of Ram or that has a very limited processing power for example area microcontroller or arduinos that are very limited in processing power like 16 to 20 megahertz and only few KB of ram like 2 KBR at Max 4 KB so in that case we cannot it is not possible to run a full TCP stack on a microcontroller that is why this uh tcyp stack is actually offloaded to the W5 5500 chip so actually the TCP all the TCP IP related tasks all the related memories are available inside the w5500 chip and we can use a relatively small simple chip

[03:43](https://www.youtube.com/watch?v=undefined&t=223s)

with a lower processing power and lower amount of RAM uh but in this case it is less flexible because the whole of the tcpip stack is hardwired inside the w5500 chip we cannot customize it uh as per our need uh so that is why I prefer you to use this ENC 28 j60 in that case we have the entire TCP stack is in form of a software running inside our microcontroller and is highly configurable but this w5500 has one very important advantage and this Advantage is that w5500 is a 100 Mbps chip on the other hand our ENC 28 j60 is only at 10

[04:22](https://www.youtube.com/watch?v=undefined&t=262s)

Mbps so if your application is very simple only the transmission of the small amount of data then it is not a problem but if you are creating a multimedia application that is sending uh for example say speeches audios or videos then this enc28 j60 will not work for you even if you are going to transfer some images or things like that then this ENC 28 j60 it will be slower for your application and in that case we recommend to go with a 100 Mbps a solution like a w5500 so this is a very important advantage that w5500 has over

[04:55](https://www.youtube.com/watch?v=undefined&t=295s)

enc28 j60 chip and now coming back to the first solution that I have discussed that choosing an sm32 microcontroller that has an inbuilt Ethernet and uh here a small problem is that this ethernet Hardware is actually composed of two parts and the first part is called the Mac which is a higher level thing and below this Mac we have the actual file f p h y so this phy phy all apply it stands for the actual physical layer and the problem is that all the moves of the scm32 microcontroller even the higher end SEO microcontroller that have this

[05:32](https://www.youtube.com/watch?v=undefined&t=332s)

inbuilt ethernet support they don't they only have the Ethernet Mac that is Mac or the medium Access Controller but they don't have built-in file or the phy the physical layer so in that case also we need a external chip that will be connected to a STM micro controller sm32 microcontroller and then this chips output that is the output of the pH y or the 5 will be actually connected to the will be actually connected to the RJ45 connector so we cannot connect an Azure 45 connector directly to the output of

[06:04](https://www.youtube.com/watch?v=undefined&t=364s)

this stm32 microcontroller even if it has built-in ethernet support but on the other hand if you see the ENC 28 j60 and this chip is a completely integrated chip that means it has both the mac and the Phi inbuilt in the single chip so if the output of this ENC 28 j60 is directly connected to the RJ45 connector or the cables but this is not the case when you use an stm32 microcontroller that has built-in ethernet even then you have to connect a five ship and this w5500 it also has an inbuilt file that is a phy chip

[06:39](https://www.youtube.com/watch?v=undefined&t=399s)

so you don't have to connect any file shift externally uh the output of this w5500 chip can directly be connected to the RJ45 or the ethernet connector so this is the advantage so now you should be having a very clear idea that when to use which solution that is when to use ENC 28 j60 controller that is when to use your inbuilt ethernet controller of our stm32 and when to use w5500 so you use microcontroller which has an inbuilt Ethernet only when your application is very complex and when your application

[07:14](https://www.youtube.com/watch?v=undefined&t=434s)

need 100 Mbps data transfer because the on on chip internet controller of this stm32 microcontroller for example the stm32f429 or f407 they have a invent ethernet controller that can support speed up to 100 Mbps so if your application require a multimedia transfer like audio video or images then please choose and skm 32 microcontroller that has inbuilt ethernet and that is also of 400 Mbps on the other hand if you are making an application that is relatively simple that is only transferring few textual commands and numbers things like simple

[07:49](https://www.youtube.com/watch?v=undefined&t=469s)

ADC data or simple commands a command that is in a form of small text then you can easily use an enc28j60 that has a 10 Mbps connectivity that will be more than enough for your application and on the other hand if you in that case also you need a microcontroller that has at least 32 KB of ram you cannot run this lwip very easily on a microcontroller that has less than 32 KB of Ram uh that is why it is recommended that at least you choose and microcontroller that has 32 KB of RAM uh for example some g0 series of the

[08:26](https://www.youtube.com/watch?v=undefined&t=506s)

stm32 microcontroller at least you have to use that you cannot use much of the stm32f0 series because they don't have event 32 KB of ram so at least you need to go with F1 series F1 series or the S4 series uh minimum you have to take but on the other hand if you don't want to go for these microcontroller even uh like this the F4 series or the F1 series and you just want to use very uh low cost microcontroller like the F0 series the arm cortex m0 based microcontroller that have a kind of like say less than

[09:00](https://www.youtube.com/watch?v=undefined&t=540s)

uh 8 KB of ram then the only solution you have is to use a w 5500 chip that has the inbuilt TCP stack so that it can offload those work from the microcontroller and you can use a very small microcontroller even AVR microcontroller or Arduino like microcontroller that has only 2kb of ram even that in that case you can use W5 5500 very easily uh but that is the fact that you cannot sustain 100 Mbps data transfer uh using a 16 megahertz MCU that is impossible uh to sustain 100 Mbps data transfer you need a relatively

[09:35](https://www.youtube.com/watch?v=undefined&t=575s)

powerful microcontroller ah that is different thing so thank you for watching see you in the next lesson

---

The W5500 Ethernet controller chip is an ideal choice for developers seeking to add Ethernet connectivity to their embedded systems without overwhelming their microcontrollers. It's a unique component that contains both the PHY and MAC layers inbuilt, making it a comprehensive solution for Ethernet control.

One of the most significant advantages of the W5500 is its ability to offload TCP/IP related tasks and memory management from the microcontroller. This feature reduces the load on the microcontroller, allowing it to process other tasks more efficiently. It's particularly beneficial for systems with microcontrollers that have limited processing power or memory, such as an ARM Cortex M0 based STM32F0 series, AVR, or Arduino microcontrollers with only 2-4KB of RAM.

Another advantage of the W5500 is its support for high-speed data transfer at 100Mbps. This speed is sufficient for most applications, including those requiring substantial data transmission.

However, one should bear in mind that while the W5500's inbuilt TCP/IP stack alleviates the microcontroller's workload, it also limits the configurability as the TCP/IP stack is hardwired. This aspect means developers may have less flexibility in customizing certain aspects of their network communication.

Despite this, for simple applications requiring high-speed Ethernet connectivity without overtaxing the microcontroller, the W5500 presents a cost-effective and efficient solution.

---

Here, I've updated the table with the recommended Microcontroller Units (MCUs) for each product and their suitable applications. This table should assist in selecting the most appropriate product to add Ethernet connectivity based on the given scenarios.

For instance, in complex applications where high-speed data transfer is required, using an STM32 microcontroller with an inbuilt Ethernet controller may be the ideal choice. However, it's worth noting that this could come at a higher cost due to the need for an external chip to provide PHY.

On the other hand, for applications that involve the transfer of simple commands like text or numbers, the ENC28J60 would be suitable. In this case, it's crucial to choose a microcontroller that has a sufficient amount of RAM.

Lastly, the W5500 could be fitting for applications with limited processing capabilities or memory. For these cases, it would be advisable to utilize an ARM Cortex M0 based microcontroller.

This table provides general recommendations and the optimal choice will vary based on the specific requirements and constraints of the actual application.

| product | Features | Advantages | Disadvantages | Recommended microcontroller | Applicable development |
| --- | --- | --- | --- | --- | --- |
| STM32 Microcontroller with inbuilt Ethernet | Advanced STM32 Microcontroller with Embedded Ethernet Controller | Suitable for high-speed data transmission (100 Mbps), suitable for complex applications | Relatively expensive, PHY (Physical Layer) part missing, requiring an external chip | If your application is complex and requires high data transfer rates (e.g. multimedia transmission) | Complex applications requiring high-speed data transmission, such as multimedia transmission |
| ENC28J60 | External Ethernet controller chip with Ethernet connectivity, connected to microcontroller via SPI interface | Cost effective, low pin count, simple to use. Entire TCP stack within the microcontroller, highly configurable | Limited to 10 Mbps Ethernet only, with both PHY and MAC built in | High-end microcontrollers with lots of RAM are recommended. Requires a microcontroller with at least 32KB of RAM | Applications that send simple commands such as text or numbers |
| W5500 | Ethernet controller chip with built-in TCP stack. Built in both PHY and MAC | Built-in memory and TCP/IP-related tasks reduce the load on the microcontroller. 100Mbps Ethernet support | TCP/IP stack is hardwired, limiting configurability | Microcontrollers with small amounts of RAM (2~4KB) or limited processing power are recommended | Ideal for applications that require offloading microcontrollers or have limited processing power or memory |

---

Source: https://maker.wiznet.io/scarlet/projects/different-ways-to-add-ethernet-connectivity-to-embedded-system/
