Lab tutorials

Using the Counter Circuit Simulator on ECExplain

Learn to use the ECExplain counter circuit simulator to observe 3-bit and 4-bit ripple and synchronous up/down counter sequences.

Visual

InputsCLKRST3-bit CounterSynchronous upMod-8OutputsQ2Q1Q0Count

Lab intro

The counter circuit simulator on ECExplain models synchronous and ripple (asynchronous) counters of 2, 3, and 4-bit widths. You apply clock pulses manually or set an auto-clock rate, and the simulator displays the current count in binary on the output LEDs and in decimal in the count readout. This tutorial covers the 3-bit synchronous up counter to show how the count advances and wraps around.

What you will learn

  • How to select counter type (synchronous or ripple) and bit width
  • How each clock pulse increments the binary count by 1
  • What happens at the terminal count: how the counter rolls over from 111 to 000
  • How to use the Reset input to force the counter back to 000 at any point

Prerequisites

  • Understanding of binary counting: 3-bit values range from 000 (0) to 111 (7)
  • Knowledge of what a clock pulse is and how flip flops respond to rising edges
  • Familiarity with the flip flop simulator or equivalent sequential circuit background

Step-by-step

  1. Step 1: Select 3-bit synchronous counter
    Open the Counter Circuit Simulator from the Labs menu. In the configuration panel, set the Type to 'Synchronous' and the Bits to 3. The output panel shows three LEDs labelled Q2 (MSB), Q1, and Q0 (LSB), all dark, and the decimal readout shows 0.
    Tip: Synchronous means all flip flops receive the clock simultaneously. Ripple means each flip flop is clocked by the output of the previous one, which introduces propagation delays. Start with synchronous to observe clean transitions.
  2. Step 2: Apply the first clock pulse
    Click the CLK button once. The count advances from 000 to 001. The Q0 LED (rightmost) lights up. The decimal readout changes from 0 to 1.
    Tip: Each click of CLK generates one rising edge. The simulator counts the rising edge only, so clicking and holding does not produce multiple counts.
  3. Step 3: Count up to 7
    Continue clicking CLK. After 7 total pulses, the LEDs show Q2=1, Q1=1, Q0=1 (all ON), and the decimal readout shows 7. This is the terminal count for a 3-bit counter.
    Tip: Watch Q1 and Q2 as you click. Q1 changes every 2 pulses and Q2 changes every 4 pulses. This matches the binary count pattern.
  4. Step 4: Observe rollover
    Click CLK one more time after reaching count 7. All three LEDs go dark and the decimal readout resets to 0. The counter has overflowed from 111 back to 000. This is the natural modulo-8 wrap of a 3-bit counter.
    Tip: Some counter ICs also produce a carry-out pulse at the terminal count to cascade into a higher-order counter. Check the carry output LED if one appears in the simulator output panel.
  5. Step 5: Use Reset
    Advance the counter to any non-zero count by clicking CLK a few times. Then click the RST (Reset) button in the inputs panel. All LEDs go dark and the decimal readout returns to 0 regardless of the current count.
    Tip: Reset is an asynchronous input in most counter circuits: it takes effect immediately when pressed, not on the next clock edge. The simulator reflects this by resetting the count the moment RST is clicked.
  6. Step 6: Switch to auto-clock and observe timing
    Enable the Auto Clock toggle and set the speed slider to 2 Hz. The counter increments automatically at 2 counts per second. The waveform display at the bottom of the simulator shows clock and Q0, Q1, Q2 traces updating in real time.
    Tip: The waveform display is the most informative at low speeds such as 1 or 2 Hz. At high speeds, the waveform compresses and individual transitions become hard to distinguish.

Expected output

After 8 clock pulses starting from reset, the counter completes one full cycle: 000, 001, 010, 011, 100, 101, 110, 111, then back to 000. The LEDs at each step match the binary representation of the decimal count shown in the readout. The waveform display shows Q0 toggling at half the clock frequency, Q1 at one quarter, and Q2 at one eighth.

Troubleshooting tips

  • Counter skips counts, for example jumping from 010 to 100: The type selector may be set to a modulo-N counter with a non-standard reset value. Switch to a straight binary counter type in the configuration panel.
  • Reset does not work while Auto Clock is running: Stop the auto-clock first using the Auto Clock toggle, then press RST. Some simulator implementations ignore asynchronous inputs during an active auto-clock cycle.
  • Decimal readout and LED states do not match: The LED labelling may be reversed. Q0 is the LSB and Q2 is the MSB. If the readout shows 3 but only Q1 is lit, the labels are swapped. Check the simulator label key at the top of the output panel.
  • Waveform display shows a flat line for Q2: The counter has not yet reached count 4 since the last reset, so Q2 has never gone HIGH. Advance past count 4 before checking the Q2 waveform trace.