Protocol Decode – Your Decoder Ring to Protocol Decode
If you are working on embedded designs such as automotive controllers, sensors, actuators, avionics, weapons systems, transmitting uncompressed audio and video data, or other chip-to-chip communications, you are probably using protocols and need a way to decode serial buses.
Protocol decode is the process of translating an electrical signal from a serial bus into meaningful bit sequences as defined by the standards of the protocol being analyzed. As we use serial buses in our designs to communicate from one device to another, we often need to debug our designs and verify we are sending the messages, or bit packets, that we intend to send.
One way to do this is to manually decode the signal. To do this, first you must capture the signal on an oscilloscope. Next, break apart the signal into one bit time slices and count the stream of ones and zeroes. Then group the sequence of bits and decode by the specifications of the protocol you are using. An example of this process is shown in the image below. This example is of a CAN bus.
While this exercise might make an interesting learning experience for engineering students, this is a tedious and obsolete way to decode. Now days, you can decode your serial buses using a protocol analyzer or protocol decode software on your oscilloscope. This oscilloscope software will count the bits and compartmentalize the data into meaningful packets based on the definitions of the protocol you are using. With many oscilloscopes, you can even view the protocol decode results in a lister window.
Keysight InfiniiVision and Infiniium oscilloscopes display the original waveform, a time aligned decode trace for the data captured on screen, and a lister which is a text based table. The lister displays all the data packets, the time at which they occurred, the type of packet, and other relevant packet information specific to the protocol in use. Additionally, the lister will include the error type if an error was detected. Below is an example of CAN protocol decode performed on an InfiniiVision oscilloscope:
Figure 2 - CAN Protocol Decode performed by InfiniiVision oscilloscope
To find errors by hand you’d have to cross reference the packets you decoded with the packets you were trying to send at that point in the sequence and check if you have errors. Plus, you would be limited to the part of the waveform you could view on screen. As you can imagine, this is tedious. However, protocol decode software can find errors for you. Plus, with Keysight oscilloscopes, you can even trigger on errors or a specified packet type so you can easily find and analyze the events that interest you.
If you are looking for an entry level, affordable oscilloscope, the Keysight InfiniiVision 1000X-Series oscilloscopes have the ability to perform protocol hardware trigger and decode of I2C, SPI, UART/RS-232, CAN, and LIN buses.
Figure 3 - Keysight 1000X-Series oscilloscope
If you are looking for an oscilloscope with higher bandwidth and additional capabilities, the Infiniium oscilloscopes offer several more protocol decode options including 8B/10B, ARINC 429, MIL-STD-1553, CAN, CAN-FD, LIN, FlexRay, DVI, HDMI, I2C, SPI, RS-232/UART, JTAG, several MIPI protocols, PCI Express, SATA/SAS, SVID, USB2.0, USB 3.0, USB 3.1, USB PD, and eSPI.
This variety of protocol decode addresses several industries. For example, the automotive industry often use CAN (Controller Area Network), CAN-FD (Controller Area Network – Flexible Data-rate), LIN (Local Interconnect Network), and FlexRay. These are the main buses used for automotive controllers, sensors, and actuators used throughout our vehicles. Designers in this space will want to be able to debug the physical layer of their designs. And because it is so important to have reliable systems in our automobiles, it is important to have reliable decode software.
Other buses that are important to have properly tested and reliable designs are ARINC 429 and MIL-STD-1553. These are often used in military equipment such as avionics, weapons systems, or ground vehicles.
As USB (Universal Serial Bus) has become so popular and continues to advance quickly, it is important to have the ability to decode both legacy USB protocols such as USB 2.0 and the newer USB protocols such as USB 3.1, and USB Power Delivery. USB is everywhere now with its use in smartphones, computer peripheral devices, cameras, power chargers for hand held devices, and drones.
High definition televisions and displays usually use HDMI (High Definition Multimedia Interface) protocol for transmitting uncompressed audio and video data. DVI (Digital Visual Interface) is also used to transmit digital video.
Buses used for Short distances with integrated circuits include I2C and SPI.
Serial buses are used everywhere. With the ability to set up the decode in less than 30 seconds, set up specialized triggers and search on specific packet types or errors, and expand the amount of useful data captured with segmented memory, oscilloscopes make decoding serial buses much more efficient than decoding by hand. Protocol decode software on oscilloscopes help you quickly move from decoding to analysis and debugging.