Protocol Decoding¶
The Protocol Decoding feature decodes digital communication protocols from captured waveforms, making it easy to analyze I2C, SPI, and UART communications. This guide covers protocol decoding in the GUI.
Overview¶
Protocol decoding converts raw digital signals into human-readable data, showing:
- Decoded bytes and packets
- Protocol-specific information (addresses, data, control bits)
- Timing and format errors
- Visual overlay on waveforms
- Export of decoded data
Supported Protocols¶
- I2C (Inter-Integrated Circuit)
- SPI (Serial Peripheral Interface)
- UART (Universal Asynchronous Receiver/Transmitter)
Opening Protocol Decode Panel¶
Using Control Panel¶
- Click Protocol Decode tab in left panel
- Panel opens with protocol selection
- Configure protocol settings
- Enable decoding
Quick Access¶
- View menu → Protocol Decoding
- Or
Ctrl+Pkeyboard shortcut
I2C Decoding¶
I2C Overview¶
I2C is a two-wire synchronous serial protocol:
- SDA: Serial Data line
- SCL: Serial Clock line
- Addressing: 7-bit or 10-bit addresses
- Bidirectional: Master/slave communication
Configuring I2C Decoder¶
1. Select Protocol:
2. Assign Channels:
3. Set Parameters:
4. Enable Decoding:
I2C Decode Display¶
Waveform Overlay:
- START condition marker (S)
- Address bytes with R/W bit
- Data bytes
- ACK/NACK indicators
- STOP condition marker (P)
Example Display:
Where:
- S = START
- 0x50 = 7-bit address (0x28) with W bit
- W = Write
- A = ACK
- N = NACK
- P = STOP
I2C Decode Table¶
Columns:
- Timestamp
- Event (START, ADDR, DATA, STOP)
- Value
- R/W
- ACK/NACK
- Error
Example:
Time | Event | Value | R/W | ACK | Error
----------|-------|--------|-----|-----|------
0.000 ms | START | - | - | - | -
0.045 ms | ADDR | 0x50 | W | A | -
0.135 ms | DATA | 0x12 | - | A | -
0.225 ms | DATA | 0x34 | - | A | -
0.315 ms | STOP | - | - | - | -
I2C Triggering¶
Trigger on I2C Events:
- START condition
- Specific address
- Specific data value
- STOP condition
- NACK (error)
Setup:
- Trigger tab
- Type: I2C
- Condition: Address Match
- Value: 0x50
SPI Decoding¶
SPI Overview¶
SPI is a four-wire synchronous serial protocol:
- MOSI: Master Out, Slave In (data from master)
- MISO: Master In, Slave Out (data from slave)
- CLK: Serial Clock
- CS (or SS): Chip Select (active low)
Configuring SPI Decoder¶
1. Select Protocol:
2. Assign Channels:
3. Set Parameters:
Clock Polarity (CPOL): 0 (or 1)
Clock Phase (CPHA): 0 (or 1)
Bit Order: MSB First (or LSB First)
Word Size: 8 bits (8, 16, 32)
CS Polarity: Active Low (or High)
4. Enable Decoding:
SPI Clock Modes¶
CPOL and CPHA define 4 modes:
| Mode | CPOL | CPHA | Clock Idle | Sample Edge |
|---|---|---|---|---|
| 0 | 0 | 0 | Low | Rising |
| 1 | 0 | 1 | Low | Falling |
| 2 | 1 | 0 | High | Falling |
| 3 | 1 | 1 | High | Rising |
SPI Decode Display¶
Waveform Overlay:
- MOSI data bytes
- MISO data bytes
- CS active regions
- Byte boundaries
Example:
SPI Decode Table¶
Columns:
- Timestamp
- MOSI Data
- MISO Data
- CS State
Example:
Time | MOSI | MISO | CS
----------|--------|--------|----
0.000 ms | - | - | ↓
0.080 ms | 0x12 | 0xFF | Low
0.160 ms | 0x34 | 0xAA | Low
0.240 ms | 0x56 | 0xBB | Low
0.320 ms | - | - | ↑
UART Decoding¶
UART Overview¶
UART is asynchronous serial communication:
- TX: Transmit data line
- RX: Receive data line
- No clock: Uses agreed baud rate
- Frame format: Start bit, data bits, parity, stop bits
Configuring UART Decoder¶
1. Select Protocol:
2. Assign Channels:
3. Set Parameters:
Baud Rate: 9600 (or custom)
Data Bits: 8 (5, 6, 7, 8, 9)
Parity: None (None, Even, Odd)
Stop Bits: 1 (1, 1.5, 2)
Bit Order: LSB First (or MSB First)
Polarity: Non-inverted (or Inverted)
4. Enable Decoding:
Common Baud Rates¶
- 1200
- 2400
- 4800
- 9600 (common)
- 19200
- 38400
- 57600
- 115200 (common)
- 230400
- 460800
- 921600
UART Decode Display¶
Waveform Overlay:
- TX data bytes
- RX data bytes
- Frame errors
- Parity errors
Example:
UART Decode Table¶
Columns:
- Timestamp
- Direction (TX/RX)
- Data (Hex/ASCII)
- Error
Example:
Time | Dir | Data (Hex) | ASCII | Error
----------|-----|------------|-------|-------
0.000 ms | TX | 0x48 | 'H' | -
1.042 ms | TX | 0x65 | 'e' | -
2.083 ms | TX | 0x6C | 'l' | -
3.125 ms | TX | 0x6C | 'l' | -
4.167 ms | TX | 0x6F | 'o' | -
5.208 ms | RX | 0x4F | 'O' | -
6.250 ms | RX | 0x4B | 'K' | -
Decoding Features¶
Display Modes¶
Overlay Mode:
- Decoded data overlaid on waveform
- Color-coded by protocol element
- Helps correlate timing with data
Table Mode:
- Decoded data in tabular format
- Easy to read and analyze
- Sortable and filterable
Both Modes:
- Show both simultaneously
- Best for analysis
Data Format Options¶
Display Formats:
- Hexadecimal: 0x12, 0x34
- Decimal: 18, 52
- Binary: 0b00010010, 0b00110100
- ASCII: 'A', 'B', 'C'
Selection:
Error Detection¶
Detected Errors:
- Framing errors (UART)
- Parity errors (UART)
- Missing ACK (I2C)
- Invalid addresses (I2C)
- Bus contentionColor
Error Highlighting:
- Red background for errors
- Error column in table
- Visual marker on waveform
Filtering and Search¶
Filter Decoded Data¶
Filter by:
- Protocol element (Address, Data, etc.)
- Value range
- Error status
- Time range
Example:
Search Function¶
Search for:
- Specific byte value
- Byte sequence
- ASCII string (UART)
- Address (I2C)
Example:
Exporting Decoded Data¶
Export to CSV¶
Format:
Timestamp, Protocol, Event, Value, Details
0.000, I2C, START, -, -
0.045, I2C, ADDR, 0x50, W, ACK
0.135, I2C, DATA, 0x12, ACK
...
To Export:
- Protocol Decode tab
- Click "Export" button
- Choose file location
- Save as CSV
Export to Text¶
Human-Readable Format:
I2C Transaction at 0.000 ms:
START
Address: 0x50 (Write) - ACK
Data: 0x12 - ACK
Data: 0x34 - ACK
STOP
Include in Waveform Export¶
When saving waveform:
- Checkbox: "Include protocol decode"
- Decode data saved with waveform
- Reload together
Live Decoding¶
Real-Time Protocol Decode¶
Enable Live View + Decode:
- Start Live View
- Enable protocol decoder
- Decoder processes each frame
- Table updates in real-time
Use Cases:
- Monitor bus traffic
- Debug communication
- Verify protocol compliance
- Capture intermittent errors
Trigger-Based Capture¶
Capture on Protocol Event:
- Configure protocol decoder
- Set trigger on event (e.g., I2C address match)
- Arm trigger
- Capture when event occurs
Example:
- Trigger on I2C address 0x50
- Capture write to EEPROM
- Decode and save transaction
Protocol-Specific Examples¶
Example 1: I2C EEPROM Read¶
Objective: Decode I2C EEPROM read operation
Configuration:
Captured Transaction:
Interpretation:
- START
- Address 0x50 (Write) - ACK
- Register address 0x00 (high byte) - ACK
- Register address 0x10 (low byte) - ACK
- Repeated START
- Address 0x51 (Read, same device) - ACK
- Data 0xAB - ACK
- Data 0xCD - NACK (last byte)
- STOP
Result: Read 2 bytes (0xAB, 0xCD) from address 0x0010
Example 2: SPI Flash Read¶
Objective: Decode SPI Flash read command
Configuration:
Captured Transaction:
Interpretation:
- CS active (low)
- Command: 0x03 (Read Data)
- Address: 0x001000 (24-bit)
- Dummy bytes from MISO
- Data from flash: 0x12, 0x34, ...
- CS inactive (high)
Example 3: UART AT Commands¶
Objective: Decode UART AT commands
Configuration:
Captured Data:
Interpretation:
- Send AT command
- Receive OK response
- Query version (AT+GMR)
- Receive version and OK
Troubleshooting¶
No Decode Output¶
Problem: Decoder shows no data
Solutions:
- Verify channels assigned correctly
- Check signal levels (logic high/low)
- Verify protocol parameters (baud rate, clock polarity, etc.)
- Ensure waveform captured
- Check threshold levels
Incorrect Decoding¶
Problem: Decoded data incorrect
Solutions:
- Verify baud rate (UART)
- Check clock polarity/phase (SPI)
- Verify bit order (MSB/LSB first)
- Check address width (I2C)
- Adjust trigger level if needed
Missing Decodes¶
Problem: Some bytes not decoded
Solutions:
- Increase sample rate
- Extend capture time
- Check for signal integrity issues
- Verify all required signals present (e.g., CS for SPI)
Frame Errors¶
Problem: Many frame/parity errors
Solutions:
- Verify baud rate is correct
- Check signal quality
- Verify parity and stop bit settings
- Check for clock drift (long transmissions)
- Ensure proper ground connection
Tips and Best Practices¶
Signal Quality¶
!!! tip "Clean Signals" - Use short ground leads on probes - Proper grounding essential - Minimize noise and ringing - Check signal integrity with eye diagram
Sample Rate¶
!!! tip "Adequate Sampling" - Sample rate ≥ 10× baud rate (UART) - Sample rate ≥ 10× clock frequency (I2C, SPI) - Higher is better for reliability - Minimum: 4× for basic decoding
Trigger Setup¶
!!! tip "Efficient Triggering" - Trigger on START condition (I2C) - Trigger on CS edge (SPI) - Trigger on specific data value - Use protocol trigger, not edge trigger
Analysis Workflow¶
!!! tip "Systematic Analysis" 1. Capture known-good transaction first 2. Verify decoder configuration 3. Compare with expected data 4. Look for timing violations 5. Check for errors and retries
Keyboard Shortcuts¶
| Shortcut | Action |
|---|---|
Ctrl+P |
Open protocol decode panel |
Ctrl+F |
Find/search in decoded data |
Ctrl+E |
Export decoded data |
Ctrl+R |
Reset decoder |
F3 |
Find next |
Shift+F3 |
Find previous |
Next Steps¶
- Interface Guide - Learn all GUI controls
- Live View - Real-time protocol decoding
- Visual Measurements - Measure timing
- User Guide - Programmatic protocol decoding