Use cases
Some use cases include:- Observe the PWM signal generated by the analogWrite() function
- Look at the Servo control signal
- Develop and debug PIO machines for the Raspberry Pi Pico
- Learn about the I2C protocol by looking at the SCL/SDA signals
Features
The Wokwi Logic Analyzer has 8 digital channels, called D0 to D7. It has a sample rate of 1GHz, which should be more than enough for most applications.- Each channel has an activity LED that turns green whenever there is activity on the channel
- The activity LEDs provide an easy way to see that the signals are connected correctly
- The logic analyzer has a small display showing the number of samples captured since the simulation started
- The configurable trigger lets you record just part of the data
Using the Logic Analyzer
Connect signals
Connect the signals you want to record to the Logic Analyzer pins. For instance, if you want to record I2C communication between an Arduino Uno and a peripheral, connect pins A4/A5 (SDA/SCL) to pins D0/D1 of the Logic Analyzer.
Start simulation
Start the simulation. You should see the green activity LEDs blink as the signals are coming in, and the number of samples should go up.
Download capture
Stop the simulation. This will download a file called “wokwi-logic.vcd” to your computer in Value Change Dump format.
Exporting VCD in VS Code
When using Wokwi for VS Code, the VCD file is automatically saved when the simulation stops, provided your diagram includes a Logic Analyzer. By default, the file is saved aswokwi.vcd in your project root.
You can customize the output path by adding the vcdFile option to your wokwi.toml file:
Using the Trigger
By default, the logic analyzer records data for the entire duration of the simulation. The trigger allows you to control the recording of data, by setting the value of one of the digital analyzer’s input pins (D7 by default). Here are some examples for common use cases:- Start recording when a button is pressed - Set the
triggerModeto “edge”, and connect the trigger pin (D7) to ground through a pull-down resistor. Connect the other end of the button to the positive power supply (VCC/5V). - Record only while the button is pressed - Same setup as above, but the
triggerModeis set to “level”. - Start recording after 1.5 seconds - Set
triggerModeto “edge”, connect the trigger pin (D7) and change the pin level to high after 1.5 seconds.
Customizing the Channel Names
By default, the channel names are D0, D1, D2, etc. You can customize the channel names by setting thechannelNames attribute. For example, to name the channels “SCL”, “SDA”, “RST”, add the following attribute to the logic analyzer:
The channel names only affect the VCD file output. The input pins of the logic analyzer are called D0, D1, etc., regardless of the
channelNames attribute.Viewing the data in PulseView
PulseView is an open source Logic Analyzer GUI. It runs on Linux, Windows, Mac OS X, and there’s even an Android version. You can visit their downloads page to get the latest version.Import VCD file
Load the recorded signal (VCD) file by clicking on the small arrow next to the “Open” button, and choosing: “Import Value Change Dump data…”

Configure import options
You’ll see a dialog where you can choose the VCD file to import. Once you selected a file, there’ll be another dialog with import options.

| Downsampling factor | Sample rate | When to use? |
|---|---|---|
| 1000 | 1MHz | Low frequency signals / long recordings (10+ minutes) |
| 50 | 20MHz | Common signals (UART, I2C, LED PWM, WS2812, etc.) |
| 10 | 100MHz | High speed signals (10MHz+) |
| 1 | 1GHz | Very high speed signals (50MHz+) |
PulseView User Manual
Learn more about using PulseView
Configuring Windows to open VCD files in PulseView
You can configure Windows to automatically open VCD files in PulseView. Open a command prompt (cmd) window as administrator, and type the following commands:Viewing the data in GTKWave
GTKWave is an open source, cross-platform wave viewer software. GTKWave can open VCD files generated by the Wokwi Logic Analyzer.wokwi2gtkwave Python Script
Automate GTKWave usage with Wokwi - monitor downloads and auto-display signals