Source: https://mokxi.com/shift-register-simulator

Simulator

# A 74HC595 shift register simulator: eight LEDs from three pins

Mokxi is a free online shift register simulator that runs in your browser, with nothing to install and no account needed. An Arduino Uno shifts a byte into a 74HC595 one bit at a time on three pins, data, clock and latch, and the chip’s eight outputs light eight LEDs. They fill up one at a time, then clear and start again.

Start building free or see the 74HC595 part

- 455 parts on the bench
- 43 boards running now
- 1.00x real time, on every board

Click to open it in the editor

The LEDs fill up one every 0.3 seconds. Click the circuit to open it in the editor.

## What you can do here

In the circuit above, or in the editor it opens.

- Watch shiftOut clock eight bits into a 74HC595
- See why nothing changes on the outputs until the latch pin rises
- Change the pattern the sketch sends and run it again
- Drive the same LEDs from the serial monitor in the companion project
- Chain a second 595 from QH′ for sixteen outputs
- Read eight buttons the other way with a 74HC165

## What the running circuit shows

Serial in, parallel out.

shiftOut() puts each bit of a byte on the data pin and pulses the clock, eight times. Inside the 595, every clock pulse moves the bits one place along an eight-stage register. The outputs do not follow as the bits ripple past: they take the register’s contents only when the latch pin goes from LOW to HIGH, so all eight change at once and the LEDs never flicker through the values in between.

In the engine the chip’s outputs read 1, 3, 7, 15 and on up to 255, one more LED every 300 ms, while the serial monitor counts “LEDs lit: 1” to “LEDs lit: 8”. A pass takes 2.7 seconds, then the outputs go back to 0 and it starts again.

## How the chip is modeled

The 16 pin 74HC595, pin for pin.

The 595 here behaves as its datasheet says: a shift register clocked on SHCP’s rising edge, a storage register clocked on STCP, an output enable that floats every output while it is HIGH, a master reset, and QH′, the serial output that feeds the next chip in a chain. VCC and GND have to be wired, and an unpowered chip lights nothing.

What it leaves out: a real 595 can only give so much current across all eight outputs at once, and eight LEDs at full brightness can ask it for more than it should give. Here the chip does not heat up, so size the resistors for a real one, not for the simulator.

How a shift register works The digital circuit simulator The 7 segment display simulator The LED matrix simulator

## Questions

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

What is the latch pin for?

It copies the shift register to the outputs. Without it, every LED would flicker through the bits as they shift past; with it, all eight change at once.

How many outputs can three pins drive?

Eight with one 595. Chain a second from the first one’s QH′ and the same three pins drive sixteen, and so on: each chip adds eight.

Can I control it from the serial monitor?

Yes. In the companion project, “Serial monitor drives eight LEDs”, type a number from 0 to 7 and that LED lights; type x to clear them all.

## More simulators

Each one opens on a circuit that is already running.

Online circuit simulator Breadboard simulator ESP32 simulator Op-amp simulator Logic gate simulator LED circuit simulator Servo simulator LCD simulator OLED simulator NeoPixel simulator 7 segment display simulator LED matrix simulator Stepper motor simulator Motor driver simulator Ultrasonic sensor simulator Rectifier simulator Digital circuit simulator Potentiometer simulator PWM simulator Relay simulator DHT11 simulator RFID simulator Accelerometer simulator RGB LED simulator Buzzer simulator MOSFET simulator Circuit simulator for kids Flip-flop simulator Multiplexer simulator Full adder simulator I2C simulator UART simulator Thermistor simulator PIR sensor simulator Oscilloscope simulator Multimeter simulator DC motor simulator Traffic light simulator Diode simulator Capacitor simulator Series and parallel circuit simulator Wheatstone bridge simulator Voltage regulator simulator Soil moisture sensor simulator Zener diode simulator Solar panel simulator AC circuit simulator Thevenin simulator Decoder simulator Encoder simulator PID simulator Robot arm simulator Load cell simulator IR sensor simulator LM35 simulator HC-05 Bluetooth simulator nRF24L01 simulator

## Shift some bits

Open the circuit, change the pattern and press Run. Nothing to install, and no account needed.

Start building free Open the editor
