Skip to main content
8-Channel Digital Logic Analyzer.

Pins

Pins D0 to D7 are connected to the input channels of the logic analyzer. There’s also a GND pin, which should be connected to the digital ground.

Attributes

bufferSize
string
default:"1000000"
Maximum number of samples to collect
channelNames
string
default:"D0,D1,D2,D3,D4,D5,D6,D7"
Comma-separated list of channel names for the VCD file
filename
string
default:"wokwi-logic"
Name of the recording file, without the extension. The filename attribute only applies to the web version. For VS Code, see vcdFile configuration.
triggerMode
string
default:"off"
Trigger mode: “off”, “level” or “edge”
triggerLevel
string
default:"high"
“high” or “low”
triggerPin
string
default:"D7"
“D0” … “D7”

Sample buffer

The logic analyzer uses a buffer to store the recorded pin data. Each pin level change (e.g. low to high) occupies one slot in the buffer. The simulator allocates the memory for the buffer in advance, to ensure fast simulation. You can choose the size of the buffer by setting the bufferSize attribute. Each slot in the buffer uses 9 bytes of RAM. Thus, the default buffer size of 1 million samples will use about 9 MB of RAM. Allocating a large buffer may strain your browser. The logic analyzer displays the number of samples captured while the simulation is running. You can use this number to estimate the required buffer size.

Trigger

The trigger controls when the logic analyzer starts recording data. By default, the trigger is off, so the logic analyzer captures all the data. You can configure the trigger using three attributes triggerMode, triggerPin and triggerEdge. The following table summarizes the available trigger modes:
triggerModeDescriptionBehavior
”off”Disable triggerAll data is recorded
”edge”Edge triggerStart recording when triggerPin equals triggerLevel
”level”Level triggerRecord only while triggerPin equals triggerLevel
The “edge” mode starts recording when the triggerPin changes to triggerLevel, and continues recording until the simulation terminates. For example, if you set triggerPin to “D7” and triggerLevel to “high” (their default values), the logic analyzer will start recording when pin D7 goes high. The “level” mode is more versatile: just like the “edge” mode, it starts recording when the triggerPin changes to triggerLevel, but it will pause the recording as soon as triggerPin changes again. For usage examples, check out the Using the Trigger section in the Logic Analyzer Guide.

Viewing the data

When you stop the simulation, the logic analyzer saves the recorded samples to a file. The recording file uses the standard Value Change Dump (VCD) format. In the web version, the file is downloaded to your computer as “wokwi-logic.vcd” by default (configurable via the filename attribute). In VS Code, the file is saved as “wokwi.vcd” in your project root (configurable via vcdFile). To learn how to view the data, please visit our Logic Analyzer Guide.

Simulator examples

Build docs developers (and LLMs) love