Chapter 11. Networks

Never let the future disturb you. You will meet it, if you have to, with the same weapons of reason that today arm you against the present.

Marcus Aurelius Antoninus, Meditations

No town or freeman shall be compelled to build bridges . . . except those with an ancient obligation to do so.

The Magna Carta

In this chapter, we’ll look at connecting your embedded computer to the real world by adding a Local Area Network (LAN) interface. Of the wide variety of networks employed, some are very common, some not so common. We’ll take a look at RS-485, CAN, and Ethernet.

RS-485, a simple network used for connecting small controllers, is very low in cost and simple to implement. CAN is a network for industrial applications in which a conventional network just won’t do. CAN is suited to electrically noisy and harsh conditions and is the network of choice in electrically severe environments. Ethernet is the intranet network that connects the world’s desktop computers, as well as a host of other devices such as routers, gateways, printers, and other peripherals.


RS-485 is a variation on RS-422 (Chapter 10) used for low-cost networking and is commonly used in many industrial applications. It is one of the simplest and easiest networks to implement. It allows multiple systems (nodes) to exchange data over a single twisted pair (Figure 11-1).

RS-485 network

Figure 11-1. RS-485 network ...

Get Designing Embedded Hardware now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.