5Serial Interface Subsystems

This chapter will focus on serial communications interfaces because these form an important aspect of many embedded system designs. In particular industry standard communication protocols will be described together with the design of supporting software. Examples will feature RS232 Communications, inter-integrated circuit (I2C) and serial peripheral interface (SPI) protocols and the universal serial bus (USB). Although C code will be employed for the examples, particular aspects of the linked assembler code will be explained where this is significant for enhanced performance.

5.1 Introduction

Serial interfaces are required when the complexity and cost of a parallel interface cannot be justified such as where the communication distance is more than a few meters. In a serial interface the data bits are assembled into a serial pattern for transmission along a single wire to their destination. In order to recover the original data a synchronised clock is required in the receiver to extract the bits from the serial stream as they arrive. Some serial interfaces use a supplementary dedicated connection for clock, whereas others require the receiver to regenerate the clock locally, obviating the need for any extra connections. For short distance serial interfaces a clock connection can be accommodated because the cost will not be significant but for longer distance communications a local clock regeneration arrangement is the only feasible alternative. ...

Get Digital Interface Design and Application 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.