Protocol decoding is probably the most wanted feature in logic analyzers. Protocol decoding is the (automatic) process of analyzing the logic signals and interpreting it according to a specific protocol. For example, the image below shows I2C signals signals with an additional layer of decoding:
In the past, to verify if a protocol was correctly working, one would look at the signals with an oscilloscope, manually interpret bits and bytes, and write them down on piece of paper. Luckily, those times are over!
Knowing how protocol decoding is important to the user, we (Ikalogic) have put a great deal of effort into allowing protocol decoders report as much information as possible. For example, the CAN bus frame below has a wrong CRC, and the decoder highlights this CRC error and even displays what should the CRC be, according to the latest CAN standards.
Similarly, it will clearly show if decoded packets are correctly constructed. For instance, the diagram below shows a LIN message frame with a correct checksum value:
This implies that ScanaStudio decoders can calculate the CRC or Checksum of a frame and compare it against the one captured in the frame. Please note that each protocol is different, so is the what data is interpreted and presented. For instance, not all protocols specify error checking and data integrity verification like CAN and LIN bus.
How (and when) to add a protocol decoder?
To add a protocol to workspace, simply go to the “Protocols” tab and click “Add new” as shown in the image below:
Then follow the instructions to configure the decoder. Please note that every protocol is different, so is its configuration, but it will at least imply selecting the channel(s) to be decoded. Depending on the complexity of a decoder’s user interface, one may read additional documentation by clicking on the “Help” button:
But the most important question is when to add a protocol decoder when apprehending a new system that need to be diagnosed, debugged, or simply analyzed. In an ideal world, one would start by adding a protocol to a workspace, configure it down to the smallest detail, then start a capture and voila, data would appear perfectly decoded on the screen! While this scenario may happen sometimes, things don’t always go that smoothly.
We recommend to first start by capture signals, without worrying about the signal decoding part. Your “human” eye analysis of the signals, their frequency, shape and periodicity can already give you some insights:
- You may recognize that some channels are not correctly connected or missing
- You may see that the voltage levels need some adjustments
- You may also notice that the interesting part of the signal happens only once every few seconds, so it would be a good idea to add a simple trigger.
At this point in time, you should already have enough information to add and configure a protocol to your workspace.
Managing the list of supported protocols
A note about scripts ecosystem
In ScanaStudio, protocol decoders (analyzers) are part of the “Scripts ecosystem”. ScanaStudio relies on scripts to add various features to the software, among which, the protocol decoding. Each protocol is supported via a script that cover one or more feature like:
- Signal decoding
- Trigger sequence generator (allowing your compatible logic analyzer to trigger on a specific protocol feature)
- Signal builder (allowing a generator-capable logic analyzer to generate specific packets for a protocol)
Scripts are open-source and highly collaborative. Ikalogic remains the main contributor to the ScanaStudio scripts, always ensuring scripts meets our standards, but we couldn’t get to where we are without the input of many active users who suggested fixes, updates and new features. Some scripts are written from the ground up by other third party users and shared back to the whole community. If you’re interested about adding your own features to ScanaStudio to automate some analysis processes, you can get started here:
Updating decoders and/or getting new ones
At any moment, you can launch the script manager from ScanaStudio by clicking on the settings menu (top right corner) and then “Scripts manager”.
This windows lets you download any new scripts that may have been added online, or update existing scripts. Scripts that have the “D” icon in the capability column are scripts that can decode signals.
Getting the most out of a decoder
Don’t hesitate to look through the configuration options that are specific to each protocol decoder. Most decoder can be configured to display the data in various formats (HEX, ASCII, Binary, etc). Some even allow you to choose different formats for different kind of fields. For instance, the I2C protocol analyzer lets you select a different display format for both DATA and Address fields:
Which can produce this result: