Speeding up embedded systems

Electronics by Design
By Ef Misoyannis, Electronics By Design
Sunday, 05 June, 2005


Embedded products are becoming more complex and are processing more data than ever before. Consequently they require faster means of communication to external systems, compared with traditional methods such as RS232 or RS485.

One solution is TCP/IP over twisted pair ethernet, allowing communications at 10 and 100 Mbps. Embedded ethernet hardware solutions are available from a variety of microcontroller semiconductor vendors, who also offer royalty-free TCP/IP software libraries (commonly called stacks), supporting a wide variety of protocols.

Libraries are available as C source, assembly language or object libraries and can be compiled with the application code, making it relatively easy to implement TCP/IP communications in an embedded product.

Benefits of TCP/IP

The benefits of using TCP/IP in embedded products are:

  • Greatly increased speed compared with RS232, RS485 or other traditional methods;
  • Widespread compatibility - a product can connect to any LAN or WAN with ease;
  • Extremely reliable communications based on international standards;
  • Wide choice of microcontroller semiconductor vendors offering TCP/IP ethernet;
  • Easy connectivity to a PC.

Development considerations

There are many issues to be considered when deciding whether to develop an embedded ethernet solution.

  • Speed

    There are two choices - 10 and 100 Mbps. For most applications 10 Mbps is sufficient. Keep in mind, however, 10 Mb networks have been in existence for many years and some sites are seriously considering phasing them out. Consequently there are compatibility issues to be considered.

    Conversely 100 Mbps hardware is more complex to develop, but offers a higher data transfer rate (if the processor can use it) and is future proof. From a software point of view, there is no impact whichever speed is selected.

  • Power consumption

    Embedded ethernet hardware will add an additional 150 mA or more to your 5 or 3.3 V power budget. This may necessitate the need to use a switched mode power supply instead of a linear power supply, increasing board cost.

  • Increased product costs

    Increased product cost is a consideration. First, there is additional development cost to be ammortised over the life of the product. Second, increased time to market resulting in reduced revenue. Third, ethernet hardware will add between $10 and $20 to the cost of the product based on small to medium volumes. This includes the additional microprocessor capability to implement TCP/IP, a 10 or 100 Mbps interface chip, isolation transformer and connector.

    Bare board cost will also increase due to additional board area, and perhaps the need to use multi-layer boards.

  • TCP/IP stacks

    The availability of TCP/IP software stacks should be considered. Most vendors supply TCP/IP stacks for their target microcon-trollers, including TCP, IP, SMTP, HTTP, SSL, AES and some of the basic TCP/IP protocols such as UDP, ICMP.

    Libraries are usually royalty free, but source codes can be bought separately if required (at additional cost). Source codes will be required only for very specialised applications.

  • Ethernet chip

    To implement embedded ethernet, a microcontroller must be interfaced to a media access controller (MAC). The MAC is the ethernet engine which implements all the requirements of IEEE 802.3 ethernet, including data transmit and receive, collision detection and re-transmission.

    The MAC interfaces to the physical layer chip (commonly called the PHY), which translates the raw data to appropriate electrical signals for 10Base-T and 100Base-T networks.

    The other side of the PHY is connected to an isolation transformer which connects to an RJ45 connector.

    The MAC and PHY are usually implemented on a single chip, which interfaces to the host microcontroller. Alternatively, the microcon-troller may have the MAC on board and use an external PHY to connect to the network.

    In this case, the hardware interface between the MAC and PHY is an industry standard media independent interface (MII), allowing a MAC to connect to PHYs from a wide variety of vendors. Regardless of whether or not the interface chip includes a MAC and PHY or just a PHY, the vendor should provide software drivers to talk to the interface chip.

    The developer should confirm that the vendor provides the appropriate driver for the target chip, otherwise the developer will be required to write the driver and this can be a very time-consuming task.

Development path

When considering an embedded ethernet development program, various requirements of hardware and software development should be considered:

  • Hardware

    The vendor should provide example schematics of an embedded ethernet application using the recommended microcon-troller. Confirm the recommended circuit meets the requirements outlined in the previous section.

    In particular, confirm the required components can be obtained in volumes suitable for your manufacturing runs, especially the interface chip.

    Confirm the recommended circuit has been used in a field application, and is not just a 'lab only' circuit.

  • Software

    The selected vendor (or a third party) should provide comprehensive development tools, compatible with its libraries. This includes an integrated development environment (IDE), C compiler and a linker. Tools should be offered at a reasonable cost.

    The vendor should also provide comprehensive documentation including application notes and code examples you can use.

    Some vendors offer real-time operating systems (RTOS) as part of their software suite. If the vendor stipulates it is mandatory to use an RTOS to implement TCP/IP, be aware of the impact the learning curve to learn the RTOS will make to your development program.

    RTOS offer tremendous benefits, but take time to learn, and require a different software structure compared with non-RTOS systems.

Vendors

There are many vendors offering embedded TCP/IP solutions.

Z World uses the Rabbit microcontrollers in its TCP/IP applications. It has comprehensive and low cost development tools and a complete TCP/IP stack. It also provides off-the-shelf single board computers (SBC) with ethernet capability, so a developer can write and debug software using the SBC as the test bed.

Developing the software before the hardware allows the developer to prove the embedded TCP/IP concept and gauge customer feedback, before committing to hardware development.

Zilog also offers TCP/IP solutions based around its microcontrollers, including the eZ80F91 which features an integrated MAC (one of a few processors available offering this).

By adding an inexpensive external PHY, the developer can realise a very cost-effective 10/100 Mbps embedded TCP/IP application.

Zilog also offers low-cost development tools including an IDE, C compiler and Linker.

Be aware its TCP/IP stack does require the use of an RTOSg, which is supplied free of charge.

Electronics By Design is a third-party design and development house, providing embedded TCP/IP solutions and expertise for over eight years. Turnkey products can be developed including software, hardware, firmware and manufacturing.

Related Articles

Hidden semiconductor activity spotted by researchers

Researchers have discovered that the material that a semiconductor chip device is built on,...

3D reflectors help boost data rate in wireless communications

Cornell researchers have developed a semiconductor chip that will enable smaller devices to...

Scientists revolutionise wireless communication with 3D processors

Scientists have developed a method for using semiconductor technology to manufacture processors...


  • All content Copyright © 2024 Westwick-Farrow Pty Ltd