Understanding and Using Ethernet-enabled MCUs for Your Next Application

MCUs offer a very wide range of Ethernet connectivity choices. With most applications demanding Internet connectivity, it’s more likely than not that your next MCU-based design will need some type of network connection. Whether your next design is a sensor that needs to consolidate and communicate data over an Ethernet link, a network-connected security camera that needs to have periodic code updates sent via the network connection, or an industrial controller that needs to use a robust industrial Ethernet connection, your choice of Ethernet-enabled MCU will be critical in delivering the capabilities required for a successful design.
Understanding and Using Ethernet-enabled MCUs for Your Next Application
Ubiquitous connectivity
Ethernet is perhaps the most successful and ubiquitous data communications standard since the telegraph. It has survived years of enhancements and modifications that have carried it from the original 10 Mbit/sec specification all the way up to 100 Gbit/sec and beyond. Versions with additional reliability, like Industrial Ethernet, are now available as well as versions with better synchronous capabilities for the transmission of real-time data such as audio and video. Ethernet with added security is growing rapidly as embedded systems become targets for hackers and viruses. Let’s look at some examples of Ethernet-enabled MCUs and the target applications they serve to better understand the choices you face when selecting the right MCU for your embedded application.
Inexpensive Ethernet implementations
You might think that adding Ethernet to an embedded system is still a pricy option, but even low-cost MCUs have Ethernet connectivity available. In fact, by using the venerable Microchip PIC32MX795 MCU, paired with the Texas Instruments DP83848 Ethernet PHY, your key component cost is very low (use the links for current Digi-Key unit prices). The PIC32MX795 also has a variety of features that make it easy to implement many common Ethernet-related functions. Of special interest are the DMA controller, Interrupt system, and Low-Power Modes. By combining these features it’s possible to wake the system from a low-power state when a packet is received (perhaps using a “Magic Packet”). The DMA controller can then be used to transfer data while the CPU is processing data, minimizing the required “on-time” of the CPU. This makes implementing network- enabled sensors, and similar embedded systems, surprisingly power efficient.
Perhaps the most useful element of the Microchip PIC32 Family Ethernet solution is the free licensed stack available for embedded designs. The stack, illustrated on the right side of Figure 1 next to the Microchip Ethernet Starter Kit Board, is divided into multiple layers, where each layer accesses services from one or more layers directly below it.
Figure 1: PIC32 Ethernet Starter Kit Board and Free Licensed TCP/IPStack. (Courtesy of Microchip)
Many of the TCP/IP layers are “live”, in the sense that they not only act when a service is requested, but also when events like time-out or new packet arrival occurs. This makes it easier to support simple embedded applications that may not require an OS or RTOS. Some of the key features of the Microchip TCP/IP stack include:

  • Supported Protocols: ARP, IP, ICMP, UDP, TCP, DHCP, SNMP, HTTP, FTP, TFTP
  • Socket support for TCP and UDP
  • Secure Sockets Layer (SSL)
  • NetBIOS Name Service
  • DNS – Domain Name System
  • Ethernet Device Discovery

Microchip offers several tutorials (including a Product Training Module on its PIC32 family), design examples and even full reference designs to make it easy to create TCP/IP-enabled embedded systems. As an example, a tutorial is available from Microchip showing the design of a network-enabled vending machine.¹

For more detail: Understanding and Using Ethernet-enabled MCUs for Your Next Application


About The Author

Ibrar Ayyub

Ibrar Ayyub is an experienced technical writer with a Master's degree in computer science from BZU Multan University. He has written for various industries, mainly home automation, and engineering. He has a clear and simple writing style and is skilled in using infographics and diagrams. He is a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter
Scroll to Top