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.
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 G bit/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.
Understanding and Using Ethernet-enabled MCUs for Your Next 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 Digit-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/IP Stack. (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.¹
Industrial Ethernet implementations

If you need a more rugged and robust Ethernet implementation you might consider using an MCU that supports Industrial Ethernet. Some MCUs provide dedicated hardware not only for the Ethernet interface but also for management and control so the CPU is available for other tasks. The Texas Instruments Sitar a Family of devices, such as the AM3352BZCZ60, has a complete Programmable Real-Time Unit Subsystem and Industrial Communication Subsystem (PRU-ICSS). This dedicated hardware element consists of dual 32-bit RISC cores (Programmable Real-Time Units, or PRUs), shared, data, and instruction memories, internal peripheral modules, and an interrupt controller (INTC). The programmable nature of the PRU (Figure 2), along with its access to pins, events, and all on-chip resources, provides flexibility in implementing fast real-time responses, specialized data handling operations, custom peripheral interfaces, and in offloading tasks from other on-chip processing elements.

Read More: Understanding and Using Ethernet-enabled MCUs for Your Next Application

Leave a Comment

Your email address will not be published. Required fields are marked *