74HC595: Efficient 8-Bit Shift Register Chip

13 March 2024 133


Ⅰ. Overview of 74HC595

Ⅱ. Pins and functions of 74HC595

Ⅲ. Logic diagram of 74HC595

Ⅳ. Application of 74HC595

Ⅴ. Design of multi-digit LED display based on 74HC595

Ⅵ. LED driver circuit design based on displacement buffer chip 74HC595

Ⅶ. How to improve the driving capability of 74HC595?



A shift register is a device that uses sequential logic to store and transfer binary data. It is a bidirectional circuit that moves each bit of data from input to output on every clock pulse. There are currently a variety of shift register models, among which the 74HC595 is such a serial-parallel output shift register. Its function is to convert serial signals into parallel signals, and is commonly used in driver chips for various digital tubes and dot matrix screens. This article will introduce its specific information in terms of pins and applications.



Ⅰ. Overview of 74HC595


74HC595 is an 8-bit serial input, parallel output shift register, and its parallel output is a three-state output. On the rising edge of SCK (serial clock), serial data is input to the internal 8-bit shift register through SDL (serial data input) and output from the Q7' (highest bit serial data output) terminal. Parallel output occurs on the rising edge of LCK (latch control). At this time, the data in the 8-bit shift register is latched into the 8-bit parallel output register. When the OE (output enable) control signal is low (enable state), the output value of the parallel output terminal is equal to the value stored in the parallel output register.


Alternatives and equivalents:

SN74HC595MPWREP



Ⅱ. Pins and functions of 74HC595


The 74HC595 has a total of 16 pins. The specific pin diagram and its functions are as follows:


294696ae1d529d6bc3fd4079bd306f72.png


Pin 1 (SER): Serial data input

The SER pin is the serial data input pin of the 74HC595. Data can be input into the chip bit by bit through this pin. When working, we first input serial data to this pin, and then shift the input data into the shift register bit by bit through the clock pin to achieve parallel transmission of data.


Pin 2 (RCLK): Register clock input

The RCLK pin is the register clock input pin of the 74HC595. When all the input data is shifted into the shift register, we adjust the level change of the RCLK pin to shift the data in the shift register into the output register at the same time. The function of this pin is to control the storage operation of data.


Pin 3 (SRCLK): Clock input

The SRCLK pin is the shift register clock input pin of the 74HC595. During the shift operation, we shift the input data into the shift register by controlling the level change of the SRCLK pin. The function of this pin is to control the clock signal of the shift operation.


Pin 4 (OE): Output enable input

The OE pin is the output enable input pin of the 74HC595. By controlling the level of this pin we can enable or disable the output pin. When the OE pin is high, the output pin is disabled and no input data is passed. When the OE pin is low, the output pin will pass the input data.


Pin 5 (DS): Serial data input (bidirectional)

The DS pin is the bidirectional serial data input pin of the 74HC595. Unlike pin 1 (SER), the DS pin can be controlled by an external circuit to implement bidirectional communication. This pin switches between serial input mode and parallel output mode.


Pin 6 (ST_CP): Output storage flip-flop clock input

The ST_CP pin is the output storage flip-flop clock input pin of the 74HC595. When the output store flip-flop clock signal changes, the data in the output memory will be stored in the output pin based on the current input. The function of this pin is to control the storage operation of data.


Pin 7 (SH_CP): Shift register clock input

The SH_CP pin is the shift register clock input pin of the 74HC595. When the shift register clock signal changes, the input data will be shifted into the shift register bit by bit. The function of this pin is to control the clock signal of the shift operation.


Pin 8 (Q7'): Output pin

The Q7' pin is the 8th bit (highest bit) output pin of 74HC595, which is used to output the 8th bit data in the shift register. The level state of this pin is determined by the input data and the data in the shift register.


Pins 9-16 (Q0-Q7): 7 output pins

The Q0 to Q7 pins are the 8 output pins of the 74HC595 (including Q0 to Q7), which are used to output the data from the lowest bit to the highest bit in the shift register. Each pin corresponds to a bit of data output. Through these pins, the data in the shift register can be output to an external circuit in parallel.



Ⅲ. Logic diagram of 74HC595


8ae90c84f5fc932496290c8c80155362.png



Ⅳ. Application of 74HC595


74HC595 is often used in the following areas:


• Relay control: The parallel output characteristics of 74HC595 make it able to drive multiple relays at the same time, and each relay can control one or more electrical devices. Therefore, through rational circuit design and programming, we can build a flexible and powerful electrical control system.


• Digital output expansion: By connecting the output pins of the microcontroller to the serial input pins of the 74HC595, we are able to realize the expansion function of the output port, thus providing more controllable output pins. In this way, we can take advantage of the 74HC595's parallel output feature to extend the microcontroller's limited output ports to more control points, realizing precise control of multiple devices or components.


• Display control: In the scenario of controlling an LCD display, the 74HC595 is able to utilize its serial input and parallel output characteristics to move the display data sent from the microcontroller into its internal registers one by one. Subsequently, it outputs these data in parallel to the driver circuit of the LCD through latch operation. In this way, we can dynamically update the content on the LCD display, whether it is text, images or video, in a smooth manner.


• Music beat light: When we combine the beat control algorithm with the 74HC595 shift register, we can cleverly create an LED light effect that is perfectly synchronized with the beat of the music. The beat control algorithm, as the core, is responsible for accurately capturing the rhythmic changes of the music and generating the corresponding control signals. These signals are not just simple switching commands, they can contain the frequency, brightness, and color change of the flashing LEDs. The 74HC595 can conveniently control the on/off state of multiple LEDs by utilizing its serial input and parallel output characteristics.



Ⅴ. Design of multi-digit LED display based on 74HC595


1. Static display


The segment selection line of each LED display is connected to the parallel output of the 74HC595, so that each bit can be displayed independently (see the figure below). At the same time, since the display of each bit is controlled by an independent 74HC595 parallel output port, its segment selection code is controlled, so the displayed characters can be different. However, for N-bit LED display requirements, we need N 74HC595 chips and N+3 I/O lines. This does take up more resources and the cost is relatively high. Such a design is obviously not beneficial for multi-digit LED displays because it increases the complexity and cost burden of the system.


e3782a90709299ae78478d37785a5ae0.png


2. Dynamic display


In multi-bit LED display applications, in order to simplify the circuit, reduce costs and save system resources, we can connect all N-bit segment code selections in parallel and control them by a 74HC595 (refer to the figure below). Since the segment selection codes of all LEDs are uniformly controlled by the parallel output port of this 74HC595, at any time, N-bit LEDs will display the same characters. If we want each LED to display different characters, we should use the scanning method. This means that at any given time, we only have one of the LEDs displaying characters. At a certain moment, the parallel output port of 74HC595 will output the segment selection code of the corresponding character. At the same time, the bit selection control I/O port will send the strobe level to the display bit to ensure that the corresponding character is displayed correctly. This process will be carried out in turn, so that each LED displays the character it should display at a time. It is worth noting that since the 74HC595 has a latch function and it takes a certain amount of time to select the serial input segment code, in actual operation, we do not need additional delay to form the visual persistence effect.


000c0009cf2ccfd89d10b2a611c8765d.png



Ⅵ. LED driver circuit design based on displacement buffer chip 74HC595


The 74HC595 chip is a member of the 74 series. It has the characteristics of fast speed, low power consumption, and simple operation. It can be easily used as a microcontroller interface to drive LEDs.


1. LED display

Seven-segment light-emitting diode displays, also known as LED displays, have been widely used in various types of instrumentation due to their low price, low power consumption and reliable performance. There are many types of dedicated LED drivers on the current market. Although most of them are rich in functions, their prices are correspondingly high. Therefore, using these drives in low-cost and simple systems not only wastes resources but also increases the cost of the product. Using the 74HC595 to drive LEDs has many advantages. First, its driving speed is fast and its power consumption is relatively low. Secondly, the 74HC595 can flexibly drive different numbers of LEDs, whether it is a common cathode LED display or a common anode LED display, it can easily handle it. In addition, through software control, we can easily adjust the brightness of the LED and even turn off the display when necessary (the data is still retained), further reducing power consumption, and waking up the display at any time when needed. The circuit designed using 74HC595 not only has simple software and hardware design, low power consumption, strong driving capability, but also occupies less I/O lines. Therefore, it has become a low-cost and flexible design solution, especially suitable for scenarios that have strict requirements on cost and resources.


2. 74HC595 chip LED drive circuit design


The picture below is a display panel circuit designed using the AT89C2051 and 74HC595 interface.


f3fb8088029a4171edfc9bc4b9cc969e.png


P115, P116, and P117 of the P1 port are used to control the LED display. They are connected to the SLCK, SCLK and SDA pins respectively. Three digital tubes are used to display the voltage value. Three digital tubes are installed on the circuit board to display the voltage value. Among them, LED3 is located on the far left, and LED1 is located on the far right. When sending data, we first send the display code of LED3, and finally send the display code of LED1. The brightness of the LED is controlled by adjusting the resistance from PR1 to PR3. This design not only ensures the orderliness of data display, but also enables flexible adjustment of brightness.



Ⅶ. How to improve the driving capability of 74HC595?


1. Use buffers or drivers: Adding buffers or drivers to the output of 74HC595, such as 74LS244 (unidirectional) or 74LS245 (bidirectional) and other bus driver chips, can enhance the driving ability of the signal and improve the stability of the signal.


2. Use proper power supply: Please make sure the power supply voltage of 74HC595 is within the specified range and its power is strong enough to meet the driving demand of the required load. If the power supply voltage is insufficient, it may cause the amplitude of the output signal to drop, which in turn affects its driving ability and thus cannot drive the load effectively.


3. Add an external driver circuit: If the output of 74HC595 is not enough to directly drive the desired load, we can add an external driver circuit, such as the use of transistors, field effect tubes (FETs) or special driver chips to amplify the output signal of 74HC595.


4. Reasonable design of PCB wiring: In PCB wiring, we should try to minimize the resistance and inductance of the wiring to improve the signal transmission efficiency. In addition, please avoid generating too much interference and noise on the wiring so as not to affect the output signal quality of 74HC595.


5. Use appropriate load resistance: We should choose appropriate load resistance according to the characteristics of the load device. If the load resistance is too small, it will lead to excessive current and may damage the 74HC595 chip. Conversely, if the load resistor is too large, it may not be able to obtain sufficient output signal amplitude.


6. Paralleling multiple outputs: If more devices need to be driven, and the driving requirements of these devices are similar, we can consider paralleling the outputs of multiple 74HC595s to enhance the overall driving capability. However, before paralleling, make sure that the driving requirements of these devices are compatible, and the total current after paralleling must not exceed the maximum output current limit of 74HC595, so as not to cause damage to the chip or affect the driving effect.




Frequently Asked Questions


1. Is 74HC595 a microcontroller?


74HC595 is a shift register which works on Serial IN Parallel OUT protocol. It receives data serially from the microcontroller and then sends out this data through parallel pins.


2. What is the function of 74HC595?


The 74HC595 is an high speed CMOS device. An eight bit shift register accpets data from the serial input (DS) on each positive transition of the shift register clock (SHCP). When asserted low the reset function sets all shift register values to zero and is indepent of all clocks.


3. How much current can 74HC595 handle?


The data sheet of the 74HC595 states that each output can deliver at least 35mA because this is the allowed maximum output current. This is clearly more then the allowed 25mA of the µC. There is another limit: the 74HC595 must not provide more than 70mA in total.


4. What is the difference between MAX7219 and 74HC595?


The 74HC595 is a shift register and the MAX7219 is a multiplexed display driver. Therefore they both don't do the same thing. The MAX7219 would be (much) easier to use with PICAXE if multiplexing the displays as the task of multiplexing them is done by the MAX7219 and not the PICAXE but it is more expensive.




Share: