Connecting Digital Tubes with Arduino Development Boards

Connecting Digital Tubes with Arduino Development Boards

Introduction to Digital Tubes

The pins related to data of 74HC595 can be divided into three categories:

DS: Serial data input, connected to a certain digital I/O pin of the microcontroller.

Q0~Q7: 8-bit parallel data output, can directly control 8 LEDs or the 8 pins of a seven-segment digital tube.

Q7′: Cascade output terminal, connected to the DS of the next 74HC595 to achieve cascading between multiple chips.

There are four pins related to control of 74HC595:

SH_CP: Clock input for the shift register. Data in the shift register shifts one position on the rising edge, i.e., data in Q0 moves to Q1, data in Q1 moves to Q2, and so on; data in the shift register remains unchanged on the falling edge.

ST_CP: Clock input for the storage register. Data from the shift register enters the storage register on the rising edge, and data in the storage register remains unchanged on the falling edge. In application, ST_CP is usually set to low, and a positive pulse is generated on ST_CP after the shifting ends to update the display data.

MR: Reset, sets the data in the shift register to zero when low; in application, it is usually directly connected to high (VCC).

OE: Output enable, output is disabled (high impedance) when high. If pins are not tight, a microcontroller pin can be used to control it, making it convenient to produce flashing and extinguishing effects. In practical applications, it can be directly connected to low (GND).

For a simple application of 74HC595, three digital I/O ports of the microcontroller can be used to control DS, SH_CP, and ST_CP, while MR and OE are connected to VCC and ground respectively.

Using 74LS595 (8-bit output latch shift register) with Microcontroller

Data ports of 74HC595:

QA–QH: Eight parallel output terminals, can directly control the 8 segments of the digital tube.

QH’: Cascade output terminal. I connect it to the SI terminal of the next 595.

SI: Serial data input terminal.

Control terminal description of 74HC595:

/SCLR (Pin 10): Sets the data in the shift register to zero when low. I usually connect it to Vcc.

SCK (Pin 11): Data in the data register shifts on the rising edge. QA–>QB–>QC–>…–>QH; data in the shift register remains unchanged on the falling edge. (Pulse width: when 5V, greater than a few tens of nanoseconds is fine. I usually choose microsecond level)

RCK (Pin 12): Data from the shift register enters the data storage register on the rising edge, and data in the storage register remains unchanged on the falling edge. I usually set RCK to low, and after shifting ends, a positive pulse is generated on RCK (when 5V, greater than a few tens of nanoseconds is fine. I usually choose microsecond level) to update the display data.

/G (Pin 13): Output is disabled (high impedance) when high. If microcontroller pins are not tight, using one pin to control it can conveniently produce flashing and extinguishing effects. This is more time-saving and labor-saving than controlling through data output.

Connection Diagram of the Digital Tube Module with Arduino

Connecting Digital Tubes with Arduino Development Boards

Wiring Instructions:

Digital Tube’s VCC – 5V on Arduino

Digital Tube’s GND — GND on Arduino

Digital Tube’s DS — A0 on Arduino

Digital Tube’s ST_CP — A1 on Arduino

Digital Tube’s SH_CP — A2 on Arduino

After downloading the program, the digital tube displays 1 2 3 4 5 6 7 8

Cascade Wiring Instructions:

When cascading, only connect the VCC, GND, DS, ST_CP, SH_CP of the digital tube together with those of another digital tube.

Connecting Digital Tubes with Arduino Development Boards

Links to purchase the above hardware are as follows:

cepark.taobao.com

Connecting Digital Tubes with Arduino Development Boards

Leave a Comment

Your email address will not be published. Required fields are marked *