CControls Blog

How to Decode Serial Data

Written by CControls Team | 24.10.2024 12:39:36

Decoding Serial Data with InfiniiVision Oscilloscope: A Comprehensive Guide

If you’re working on the design or debugging of a serial bus protocol in a system, like USB, you likely have many weapons in your arsenal. A common first choice is a protocol analyzer. This tool will read out protocol layer information on the bus it’s designed to analyze. An example solution is Total Phase’s Beagle I2C/SPI sniffer. This will tell you what is being communicated and help identify improperly transmitted bits or frames. But, this tool will not tell you how or why said errors occur, nor show you bit timing.

A next step might be a logic analyzer with decode capabilities. Plenty of options exist at all different price ranges depending on your channel density and speeds required. This will show you the data being transmitted in the protocol layer, and show you bit timing charts using high/low views.

The ultimate tool is the oscilloscope, which provides the best view of physical layer issues that could be plaguing your bus. These physical layer problems – such as noise, jitter, glitches, or unstable edges – can’t be viewed on a protocol or logic analyzer.

 

How does an oscilloscope decode and trigger on a serial bus?

There are two ways an oscilloscope can decode bus traffic. The first is using a software routine. An acquisition is taken, then analyzed before the next acquisition. Second is using an ASIC or FPGA. This is much faster and can be done in real time. Both methods accomplish the same thing: identifying high and low levels in time, and using a given bit rate, creating a sequence of 1’s and 0’s. Once a bit stream is translated by the oscilloscope (e.g. 10001001010110010), the protocol in question must be identified and defined. Every protocol has a syntax, and the decoded bits are fed into it to translate them to readable information to the user. Most protocols have options that can change how the data is transmitted – this can range from bit rate, address size, payload size, and bit order. All of this needs to be fed to the oscilloscope for proper translation. Once that’s done, the oscilloscope can translate information from the bus into readable information to the user.

 

How to Decode Serial Data - The video series

  • Decode: I2C
  • Decode: SPI
  • Decode: UART
  • Decode: RS232
  • Decode: CAN
  • Decode: CAN FD
  • Decode: LIN
  • Decode: Flexray
  • Decode: I2S
  • Decode: MIL-STD1553
  • Decode: ARINC 429
  • Decode: USB
  • Decode: SENT

 

Oscilloscope Serial Decode - How to Decode Serial Data

Learn how to use an oscilloscope with serial decode and trigger!