Chapter 10. Serial Ports

Yet all experience is an arch wherethro’Gleams that untravell’d world whose margin fades For ever and for ever when I move.

Alfred, Lord Tennyson, Ulysses

Serial I/O involves the transfer of data over a single wire for each direction. All serial interfaces convert parallel data to a serial bit stream and vice versa. Serial communication is employed when moving data in parallel between systems is not practical, either in physical or cost terms. Such serial communication may be between a computer and a terminal or printer, the infrared beamings of a Palm computer or remote control, or, in more advanced forms, high-speed network communication such as Ethernet. For embedded computers, a simple serial interface is the easiest and cheapest way to connect to a host computer, either as part of the application or merely for debugging purposes.

This chapter looks at serial ports and how you implement an RS-232C interface. We’ll even take a look at how you can power your embedded system through an RS-232C port. From there, we’ll take a look at the more robust RS-422. We’ll then take a look at a serial interface with a difference, IrDA. IrDA uses pulses of infrared light to transmit data across short distances, without the need of interconnecting cables. Finally, we’ll take a look at a serial interface that is rapidly dominating both desktop computers and peripherals. USB allows peripherals to be networked to a host desktop computer and is becoming the standard by which ...

Get Designing Embedded Hardware now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.