Serial buses are pervasive in today’s digital designs and are used for a variety of purposes including on-board chip-to-chip communication, CPU to peripheral control, as well as for remote sensor data transfer and control. Without intelligent oscilloscope serial bus triggering and protocol decode, it can be difficult to debug these buses and correlate data transfers with other mixed signal interactions in your system. Keysight’s InfiniiVision X-Series and Infiniium Series oscilloscopes (DSOs) and mixed-signal oscilloscopes (MSOs) offer optional integrated serial bus triggering and hardware-based protocol decoding solutions that give you the tools you need to accelerate debug of your designs that include serial bus communication.
Philips originally developed the I2C (Inter-Integrated Circuit) bus for communication between devices inside of a TV set. Today, I2C is used in a broad range of applications for efficient inter-IC control and is supported by most semiconductor vendors. The I2C bus consists of a simple bi-directional two-wire bus with two signal lines, SCL (serial clock) and SDA (serial data). All I2C bus compatible devices have an on-chip interface that allows them to communicate directly with each other. Most I2C devices operate at speeds up to 400-Kbps, with some going into the low megahertz range.
The protocol is well defined and has a built in addressing scheme so there is no need for chip select or logic controls. This makes it an inexpensive and simple solution to link many devices of an embedded design together. When it was first introduced, the I2C bus protocol used 7 bits for addressing. To accommodate the higher demand for more address spacethe bus now allows for 10-bit addressing and speeds up to 3.4 MHz yet remains backward compatible. Because of its low cost, it is widely used in many products, including cell phones, audio/video instruments, medical equipment, and industrial applications. In fact, there are hundreds of I2C compatible devices available today.y. Examples of simple I2C compatible devices found in embedded systems include EEPROMs, thermal sensors, and realtime clocks. The I2C bus physically consists of two active signals and a ground connection. The signals SDA and SCL are both bi-directional. Everycomponent connected to the bus has its own unique address, whether it is a CPU, an LCD driver, or an EEPROM. Each of these chips can act as a receiver and/or transmitter depending on their function. In addition, there may be one or more bus masters. The device that initiates data transfer on the bus is considered the bus master and all the others are bus slaves. Masters are generally microcontrollers, microprocessors, or DSPs
The Serial Peripheral Interface, SPI, is a serial bus standard originally introduced by Motorola with interfaces available on many popular communication processors and microcontrollers. Like I2C, SPI provides good support for communication with slow peripheral devices that are accessed intermittently, such as EEPROMs and real-time clocks. However, SPI is better suited than I2C for applications that are thought of as data streams because of its high bandwidth (in the tens of megahertz), whereas I2C devices read and write to addressed locations in a slave device. An example of a data stream application is the data communication between microprocessors, microcontrollers, A/D converters, D/A converters, or DSPs. Devices on a SPI bus communicate using a master/slave relationship, in which the master, usually the microcontroller, initiates the data transfer. When the master generates a clock and selects a slave device, data can be transferred in either or both directions at the same time (called full-duplex mode). The protocol helps the device to determine if the data is a valid signal or not, depending on bits set in the frame.
The SPI bus consists of two data lines and two control lines. The data lines are MOSI (master data output/slave data input) and MISO (master data input/slave data output). The control lines include SCLK (serial clock), and SS (slave select). The master may transmit data at a variety of data rates. The serial clock control line is driven by the master and controls the flowof the data bits and cycles once for each bit transmitted. The slave select control line allows slaves to be turned on and off with hardware control. Unlike I2C, the SPI protocol does not have a start of frame; the chip select or slave select (SS) going high or low (depending on the device) frames the data.