Home  Product Technical Articles   IC 74HC595 Application: 8 Bit LED Digital Tube

IC 74HC595 Application: 8 Bit LED Digital Tube

Author: Mia
Date: 8 Mar 2022
 4161
74hc595 arduino

Ordering & Quality

Photo Mfr. Part # Company Description Package PDF Qty Pricing
(USD)
74HC595 74HC595 Company:STMicroelectronics Remark:8-Bit Serial-Input/Serial or Parallel-Output Shift Register with Latched 3-State Outputs Package:SOP-16
N/A
In Stock:On Order
Buy
Price:
Call
Buy
74HC595B1 74HC595B1 Company:STMicroelectronics Remark:IC SHIFT REGISTER 8BIT 16-DIP Package:DIP16
N/A
In Stock:On Order
Buy
Price:
Call
Buy
74HC595BQ-115 74HC595BQ-115 Company:Nexperia USA Inc. Remark:IC 8BIT SHIFT REGISTER 16-DHVQFN Package:16-VFQFN Exposed Pad
DataSheet
In Stock:87000
Buy
Price:
3000+: $0.10346
6000+: $0.09719
15000+: $0.09092
30000+: $0.08339
75000+: $0.08026
150000+: $0.07712
Buy
74HC595D-112 74HC595D-112 Company:Nexperia USA Inc. Remark:IC SHIFT REGISTER 8BIT 16SOIC Package:16-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:5102
Buy
Price:
1+: $0.38000
10+: $0.31100
25+: $0.28440
100+: $0.21150
250+: $0.19168
500+: $0.15864
1000+: $0.11898
2500+: $0.10906
5000+: $0.10246
Buy
74HC595D-118 74HC595D-118 Company:Nexperia USA Inc. Remark:IC SHIFT REGISTER 8BIT 16SOIC Package:16-SOIC (0.154", 3.90mm Width)
DataSheet
In Stock:82500
Buy
Price:
2500+: $0.08960
5000+: $0.08463
12500+: $0.07716
25000+: $0.07218
62500+: $0.06471
125000+: $0.06223
Buy
74HC595DR 74HC595DR Company:ON Semiconductor Remark:Integrated Circuits (ICs) SOP-16 Package:SOP-16
N/A
In Stock:On Order
Buy
Price:
Call
Buy
74HC595DR2G 74HC595DR2G Company:ON Semiconductor Remark:8-Bit Shift Register w/Output Storage Register (3-State),DAC (D/A Converters) SHIFT RGSTR 3-STATE Package:SOIC-16
N/A
In Stock:On Order
Buy
Price:
Call
Buy
74HC595PW-112 74HC595PW-112 Company:Nexperia USA Inc. Remark:Shift Shift Register Element Bit 16-TSSOP Package:16-TSSOP (0.173", 4.40mm Width)
N/A
In Stock:On Order
Buy
Price:
1+: $0.34000
10+: $0.27600
25+: $0.25240
100+: $0.18790
250+: $0.17024
500+: $0.14090
1000+: $0.10568
2500+: $0.09687
5000+: $0.09100
Buy
74HC595PW-118 74HC595PW-118 Company:Nexperia USA Inc. Remark:IC SHIFT REGISTER 8BIT 16TSSOP Package:16-TSSOP (0.173", 4.40mm Width)
DataSheet
In Stock:217500
Buy
Price:
2500+: $0.09108
5000+: $0.08602
12500+: $0.07843
25000+: $0.07337
62500+: $0.06578
125000+: $0.06325
Buy
74HC595PW-Q100-118 74HC595PW-Q100-118 Company:Nexperia USA Inc. Remark:Shift Shift Register Element Bit 16-TSSOP Package:16-TSSOP (0.173", 4.40mm Width)
N/A
In Stock:On Order
Buy
Price:
1+: $0.39000
10+: $0.33000
25+: $0.30800
100+: $0.24630
250+: $0.22872
500+: $0.19354
1000+: $0.14955
2500+: $0.13768
5000+: $0.12880
12500+: $0.11991
25000+: $0.11688
Buy

I Description

Do you know what the Digital Tube Display needs? The display of the digital tube requires a digital tube and a control circuit of multiple digital tubes. Take the single-chip microcomputer control circuit of an 8-bit digital tube as an example. The single-chip microcomputer needs to provide an 8-bit segment code and an 8-bit code. Thus, we usually choose two of the four parallel  I/O  ports in the 51 single-chip microcomputers to provide segment codes and bit codes respectively.

Although this circuit hardware connection and software programming are relatively simple, there are also problems. That is: Too many  I/O ports are occupied, which affects the overall use of the microcontroller, and is not conducive to the access of other devices. How to solve this problem? We can use a type of shift register for auxiliary control. Here, this blog uses the 74HC595 chip.

74hc595

Figure 1. 74HC595

Catalog

I Description

II Introduction to 74HC595

III 74HC595 Display Control of Multi-digit Digital Tube

3.1 Hardware Connection

3.2 Software Programming

3.3 Simulation Debugging

IV Conclusion

FAQ

Ordering & Quantity

II Introduction to 74HC595

74HC595 is a CMOS shift register with open-drain output. The output port is a controllable three-state output. It can also control the next-level cascaded chip serially. Its structure is usually a 16-pin DIP package or SO package. The 74HC595 pinout is shown in Figure 2, and the corresponding pin functions are shown in Table 1.

  74hc595 pinout

Figure 2. 74HC595 Pinout

The main features of 74HC595  are:

  1. 8-bit serial input/8-bit parallel or serial output;
  2. Three-state output register (three-state output: a gate circuit  with three output states of high level, low level, and high impedance);
  3.  High-speed low-power consumption, high-speed shift clock frequency Fmax> 25MHz.

Table 1. 74HC595 Pin Function

Pin Number

Pin Name

Pin Function

15,1~7

Q0~Q7

Parallel tri-state output pin

8

GND

Power ground

9

Q7’

Serial data output pin

10

/MR

Clear end of shift register (active low)

11

SH_CP

Serial data input clock line

12

ST_CP

Output memory latch clock line

13

/OE

Output enable (active low)

14

DS

Serial data input line

16

VCC

Power end

III 74HC595 Display Control of Multi-digit Digital Tube

Here, this blog takes the single-chip microcomputer control multi-digit digital tube as an example. To use the chip correctly, you must first correctly understand the timing diagram or truth table of the chip. The truth table of 74HC595 is shown in Table 2.

Input Pin

Output Pin

DS

SH CP

/MR

ST CP

/OE

×

×

×

×

H

Q0~Q7 output high impedance

×

×

×

×

L

Q0~Q7 output effective value

×

×

L

×

×

Clear shift register

L

Rising Edge

H

 

×

×

Shift register store low level

H

Rising Edge

H

×

×

Shift register store high level

×

Falling Edge

H

×

×

Shift register state retention

×

×

×

Rising Edge

×

State value in output shift register

×

×

×

Falling Edge

×

Output memory state retention

It can be found that the serial data is connected to the DS pin, but it is the only input to the shift register when SH_CP is a rising edge and enters the storage register when ST_CP is a rising edge. If the two clocks are connected together, the shift register is always one pulse earlier than the storage register.

The shift register has a serial shift input (Ds), a serial output (Q7'), and an asynchronous low-level reset. The storage register has a parallel 8-bit, three-state bus output. When OE is enabled (low level), the data of the storage register is output to the bus.

3.1 Hardware Connection

Since the 8-bit digital tube needs to provide a total of 16 bits of segment code and bit code at the same time, it cannot be realized by using one 74HC595.  To solve this problem, we use two 595 chips to cascade serially to provide an 8-bit segment code (provided by U2) and an 8-bit code (provided by U3). The simulation hardware circuit is shown in Figure 3. The input signal of 595 is connected to the three I/O ports of P2.0~P2.2 respectively. Among them, P2.0 provides serial input signals, P2.1 and P2.2 provide output and input clock signals respectively.

simulation hardware circuit diagram

Figure 3. Simulation Hardware Circuit Diagram

3.2 Software Programming

Here, we use 2 pieces of 74HC595 chips for serial cascading. Therefore, you must pay attention to the sequence of serial data output when programming. The usual practice is as follows:

  • First, write the data (ie bit code) of the 74HC595 chip at the next level;
  • Then, write the data (ie segment code) of the first-level 74HC595 chip;
  • Finally, release the parallel output pins together at once.

The sample program is as follows (partial):

  void OneLed_Out (uchar i,uchar Location)

  {

  uchar j;

  OutByte=Location;

  for(j=1;j<=8;j++)

  {

  DS=Bit_Out;

  SH_CP=0;SH_CP=1;SH_CP=0;

  OutByte=OutByte<<1;

  }

  OutByte=~Segment[i];

  for(j=1;j<=8;j++)

  {

  DS=Bit_Out;

  SH_CP=0;SH_CP=1;SH_CP=0;

  OutByte=OutByte<<1;

  }

  ST_CP=0;ST_CP=1;ST_CP=0;

  }

3.3 Simulation Debugging

We can draw the hardware circuit diagram on the Proteus 7 platform, and then write the software program on the Keil4.0 platform and compile and debug it. Then, load the generated HEX file into the simulation chip and run the simulation. If all goes well, the results will be displayed correctly. According to the display requirements, it can realize 8-bit digital tube shift display or 8-bit digital tube simultaneous display.

The simulation results are shown in Figures 4 and 5.

  Figure 4. Shift Display of 8-bit Digital Tube

  Figure 5. Simultaneous Display of 8-bit Digital Tubes

IV Conclusion

The test results of this blog show that there are many advantages to the display control of multi-digit digital tubes through the cascade of 74HC595 chips. These benefits are mainly reflected in the following aspects:

  1. It can greatly reduce the display control of the single-chip digital tube;
  2. It can greatly reduce the occupancy of the MCU  I/O port line;
  3. The circuit is simple and easy to program.

The method introduced in this blog, whether it is to conduct simulation teaching on a computer, or to build actual hardware circuits. In general, the current 74HC595 chip is cost-effective, and the cost of building a circuit is low, making it very suitable for general use.


FAQ

  • What is 74HC595?

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.

  • What is a 74hc595n?

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.

  • What is a digital tube?

Light emitting diode connects the anode together and then connected to the power of positive is called common anode digital tube, light emitting diode connected to the cathode and then connected to the power of the cathode is called common cathode digital tube.

  • What is the difference between shift register and counter?

In a shift register, the input of element N is the output of element N-1, and all elements use the same clock. In a counter, the input of element N is the inverse of its output, and the clock of element N+1 is the output of element N.

Related Articles

78L05 Voltage Regulator: PDF, Pinout, Datasheet

Iggy 24 Jan 2022 15127

The 78L05 is a three terminal integrated regulator. Its excellent internal current limit and thermal shutdown characteristics make it particularly suitable for overload conditions. When used to repla...

Continue reading »

LM2904 Dual Op Amp: Pinout, Use, Datasheet

Mia 6 Apr 2022 2927

LM2904 is a dual operational amplifier.   This blog introduces the LM2904 dual operational amplifier about its pinout, features, applications, and its uses, etc. CatalogLM2904 DescriptionLM2...

Continue reading »

LPC2378FBD144: CAD Models, Datasheet, Features

Candy 13 May 2023 590

CatalogLPC2378FBD144 Product OverviewLPC2378FBD144 CAD ModelsLPC2378FBD144 Pin ConfigurationLPC2378FBD144 Block DiagramLPC2378FBD144 Application InformationLPC2378FBD144 FeaturesLPC2378FBD144 Applicat...

Continue reading »

LT3045EDD LDO Voltage Regulators: Datasheet, Pinout, Specification [FAQ]

Irene 13 May 2022 1477

Product OverviewThe LT®3045-EP is a high performance low dropout linear regulator featuring LTC’s ultralow noise and ultrahigh PSRR architecture for powering noise sensitive applications. De...

Continue reading »

BAR43 Small Signal Schottky Diode Datasheet PDF Download

Irene 23 Feb 2022 821

Catalog DescriptionFeaturesDevice summaryAbsolute Ratings (Limiting Values)Thermal ParameterStatic Electrical CharacteristicsDynamic characteristicsElectrical CharacteristicsPackage information ...

Continue reading »

0 comment

Leave a Reply

Your email address will not be published.

 
 
   
 
Rating:

# 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z