I. Introduction
The 74HC595 is an 8-bit serial-in or parallel-out shift register with a storage register and 3-state outputs. 74HC595 with the characteristics of high speed, low power consumption, and simple operation, can be easily used in the MCU interface to drive LED operation. This article introduces the circuit design of LED displays driven by 74HC595.
Catalog
II. Basic Description
2.1 LED Display
A 7 Segment LED Display, also known as an LED display, has been widely used in various instruments because of its low price, low power consumption, and reliable performance. There are many types of LED drivers on the market, and most of them have multiple functions, but the price is correspondingly higher. If used in a simple system with low cost, it is not only a waste of resources but also increases the cost of products. Using a 74HC595 chip to drive LED has various disadvantages. High speed, low power consumption, unlimited number of LED s. It can control both the common cathode LED display and the common anode LED display. The circuit designed with 74HC595 is not only simple but also low in power consumption and strong in driving ability. It is a low-cost and flexible design scheme.
2.2 74HC595
The 74HC595 is an 8-bit serial-in/serial or parallel-out shift register with a storage register and 3-state outputs. Both the shift and storage register have separate clocks. The device features a serial input (DS) and a serial output (Q7S) to enable cascading and an asynchronous reset MR input. A LOW on MR will reset the shift register. Data is shifted on the LOW-to-HIGH transitions of the SHCP input. The data in the shift register is transferred to the storage register on a LOW-to-HIGH transition of the STCP input. If both clocks are connected together, the shift register will always be one clock pulse ahead of the storage register. Data in the storage register appears at the output whenever the output enable input (OE) is LOW. A HIGH on OE causes the outputs to assume a high-impedance OFF-state. Operation of the OE input does not affect the state of the registers. Inputs include clamp diodes. This enables the use of current limiting resistors to interface inputs to voltages in excess of VCC.
Figure 1. 74HC595 Functional Diagram
Figure 2. 74HC595 Logic Symbol
III. Circuit Design
3.1 Hardware Circuit
Figure 3 is a display panel circuit designed with AT89C2051 and 74HC595 interface.
Figure 3. Circuit of Display Panel
The P115, P116, and P117 of the P1 port are used to control the display of the LED. and they are connected to the SLCK, SCLK, and SDA pins respectively. Three digital tubes are used to display the voltage value. On the circuit board, LED3 is on the far left and LED1 is on the far right. When sending data, first send the display code of LED3, and finally, send the display code of LED1. The brightness of the LED is controlled by the resistance of PR1 to PR3.
2.2 Display Driver
Use DISP1, DISP2, and DISP3 to store display data. After the CPU initialization is complete, call the LRDISP subroutine to clear the register of 74HC595. There is no need to call the clear subroutine before calling the display subroutine DISPLAY. Now write the two subroutines as follows.
①
CLRDISP:
MOVR2,#24
CLRBIT:
CLRSCLK
CLRC
MOVSDA,C
SETBSCLK
DJNZR2,CLRBIT
RET
②
Display:
CLRSLCK
MOVR3,#3
MOVR0,#DISP3
DISP1:
MOVA,@R0
MOVR2,#8
DISP2:
CLRSCLK
RLCA
MOVSDA,C
SETBSCLK
DJNZR2,DISP2
DECR0
DJNZR3,DISP1
SETBSLCK
RET
IV. Conclusion
It can be seen from the above examples that there are no complicated technical problems in the design of hardware and software when 74HC595 is used to design an LED driver circuit. In addition, 74HC595 can be used not only to drive LED displays but also to drive light-emitting diodes. Each 74HC595 can drive 8 LEDs simultaneously. This solution is ideal when the volume requirements of the product are not high and want to reduce the cost.
FAQ
- Where can the 74HC595 be used to drive LED operation?
MCU interface
|
- What does the 74HC595 feature to enable cascading and an asynchronous reset MR input?
A serial input (DS) and a serial output (Q7S)
|
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. We can increase our output pins by 8 using the single chip.
|
8-bit Shift Register 74HC595N
A shift register is a chip you can use to control many outputs (8 here) at the same time while only using a few pins (3 here) of your Arduino.
|
- How does a shift register work?
Shift registers hold the data in their memory which is moved or “shifted” to their required positions on each clock pulse. Each clock pulse shifts the contents of the register one bit position to either the left or the right.
|
- How 74HC595 Shift Regiester works?
The 595 has two registers (which can be thought of as “memory containers”), each with just 8 bits of data. The first one is called the Shift Register. The Shift Register lies deep within the IC circuits, quietly accepting input.
|
- How does an 8 bit shift register work?
The SN74HC595N is a simple 8-bit shift register IC. Simply put, this shift register is a device that allows additional inputs or outputs to be added to a microcontroller by converting data between parallel and serial formats. Your chosen microprocessor is able to communicate with the The SN74HC595N using serial information then gathers or outputs information in a parallel (multi-pin) format. Essentially it takes 8 bits from the serial input and then outputs them to 8 pins.
|