Bringup
Open the editor
Verilog (digital engine)74HC595v_hc595

74HC595 (8-bit shift register, latched outputs)

74HC595: serial in (SER, SRCLK), parallel out QA–QH through a storage register (RCLK) with tri-state outputs (OE̅), cascade output QH'. Functional Verilog model, numbered SOIC-16 pins as in the TI datasheet.

QBQCQDQEQFQGQHGNDQHSnSRCLRSRCLKRCLKnOESERQAVCC74HC595
Schematic symbol

Key data

Category
Logic (Verilog)
Simulation model
Verilog (digital engine)
Manufacturer part number
74HC595
Reference prefix
U
Pins
16
Land pattern
SOIC-16_3.9x9.9mm_P1.27mm

Notes

  • Arduino: shiftOut(dataPin, clockPin, MSBFIRST, value) on SER and SRCLK, then a pulse on RCLK shows the byte on QA–QH (QH = first bit sent with MSBFIRST).
  • Chain several chips: QH' to SER of the next one, SRCLK and RCLK in parallel.
  • Tie SRCLR̅ to VCC and OE̅ to GND when you do not need them; each output drives an LED through its own resistor.

Simulation model

The Verilog source is synthesized to gates with Yosys (WebAssembly) and simulated event by event. Outputs drive the analog circuit like CMOS pins through a driver resistance to the supply; inputs switch at 30 % and 70 % of the supply.

Supply pins
16 / 8
Top module
v_hc595
Output driver resistance
50 Ω
Verilog source

module v_hc595(input SER,SRCLK,RCLK,nSRCLR,nOE,output QA,QB,QC,QD,QE,QF,QG,QH,QHS);
reg [7:0] sr,st;
always @(posedge SRCLK or negedge nSRCLR) if(!nSRCLR)sr<=8'b0;else sr<={sr[6:0],SER};
always @(posedge RCLK) st<=sr;
assign {QH,QG,QF,QE,QD,QC,QB,QA}=nOE?8'bzzzzzzzz:st;
assign QHS=sr[7];
endmodule

Pins 16

PinNameUse
1QBOutput pinParallel output B
2QCOutput pinParallel output C
3QDOutput pinParallel output D
4QEOutput pinParallel output E
5QFOutput pinParallel output F
6QGOutput pinParallel output G
7QHOutput pinParallel output H
8GNDGround pinGround
9QHSOutput pinSerial out (QH'): to SER of the next 74HC595 for chains
10nSRCLRInput pinClear the shift register, active low: tie to VCC when unused
11SRCLKInput pinShift clock: rising edge shifts SER in
12RCLKInput pinStorage (latch) clock: rising edge copies the shift register to QA–QH
13nOEInput pinOutput enable, active low: GND = outputs on, high = outputs off (high impedance)
14SERInput pinSerial data in: the next bit, shifted in on the rising SRCLK edge
15QAOutput pinParallel output A (first bit shifted in last)
16VCCSupply pinSupply 2–6 V: 100 nF to GND

Parameters 1

Gate delaytpd
Default10n

PCB

Verified land patternSOIC-16_3.9x9.9mm_P1.27mm