We are Apogeeweb Semiconductor Electronic

WELCOME TO OUR BLOG

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

IC 74HC595 Application: 8 Bit LED Digital Tube

Author: Mia
Date: 9 Oct 2020
 960
74hc595 arduino

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 microcomputer 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 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.

Ordering & Quality

Photo Mfr. Part # Company Description Package PDF Qty Pricing
(USD)
74HC595BQ-115 74HC595BQ-115 Company:Nexperia USA Inc. Remark:IC 8BIT SHIFT REGISTER 16-DHVQFN Package:16-VFQFN Exposed Pad
DataSheet
In Stock:87000
Inquiry
Price:
3000+: $0.10346
6000+: $0.09719
15000+: $0.09092
30000+: $0.08339
75000+: $0.08026
150000+: $0.07712
Inquiry
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
Inquiry
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
Inquiry
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
Inquiry
Price:
2500+: $0.08960
5000+: $0.08463
12500+: $0.07716
25000+: $0.07218
62500+: $0.06471
125000+: $0.06223
Inquiry
74HC595N-112 74HC595N-112 Company:Rochester Electronics, LLC Remark:SERIAL IN PARALLEL OUT Package:16-DIP (0.300", 7.62mm)
DataSheet
In Stock:On Order
Inquiry
Price:
658+: $0.38000
Inquiry
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
Inquiry
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
Inquiry
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
Inquiry
Price:
2500+: $0.09108
5000+: $0.08602
12500+: $0.07843
25000+: $0.07337
62500+: $0.06578
125000+: $0.06325
Inquiry
74HC595PW-AUJ 74HC595PW-AUJ Company:NXP USA Inc. Remark:IC COUNTER REGISTER 8BIT 16TSSOP Package:16-TSSOP (0.173", 4.40mm Width)
DataSheet
In Stock:On Order
Inquiry
Price:
Call
Inquiry
74HC595PW-C1118 74HC595PW-C1118 Company:NXP USA Inc. Remark:Shift Shift Register Element Bit 16-TSSOP Package:16-TSSOP (0.173", 4.40mm Width)
N/A
In Stock:On Order
Inquiry
Price:
3435+: $0.07000
Inquiry
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
Inquiry
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
Inquiry
CD74HC595NS CD74HC595NS Company:Texas Instruments Remark:Shift Shift Register 1 Element 8 Bit 16-SO Package:16-SOIC (0.209"", 5.30mm Width)
DataSheet
In Stock:On Order
Inquiry
Price:
Call
Inquiry

Related Articles

MB10F Bridge Rectifier: Pinout, Datasheet, Equivalent

Irene 2 Sep 2021  132

MB10F is a Surface Mount Glass Passivated Bridge Rectifier 0.5A 1000V 4-SOIC. CatalogProduct OverviewMB10F CAD ModelsMB10F Package DimensionsMB10F Suggested Pad LayoutMB10F FeaturesMB10F Product Attr...

Continue reading »

78L05 Voltage Regulator: PDF, Pinout, Datasheet

Iggy 19 Apr 2021  1753

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 »

FRDM-K64F MCU Development Board: Datasheet, Software, Specifications

Irene 11 Sep 2021  66

The Freedom-K64F is an Ultra-Low-Cost Development Platform for Kinetis K64, K63, and K24 MCUs. FRDM-K64F Development Platform / How To Use CatalogProduct OverviewFRDM-K64F Block DiagramFRDM-K64F F...

Continue reading »

BC547 Transistor: Pinout, Circuit, Applications [Video]

Billily 23 Dec 2020  3711

DescriptionBC547 is a Bipolar Junction Transistor (abbreviated as BJT). It is an NPN transistor and has three terminals named as: Emitter Collector Base Catalog DescriptionBC547 PinoutBC547...

Continue reading »

ATTINY1616 Microcontroller:Datasheet,Pinout and Development Board

Irene 11 Sep 2021  108

  Catalog DescriptiontinyAVR 1-series OverviewATTINY1616 PinoutATTINY1616 Development BoardProgrammerBlock DiagramConfiguration and User Fuses (FUSE)FeaturesDatasheetProduct AttributesManufactu...

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