Book Image

Raspberry Pi LED Blueprints

By : Agus Kurniawan
Book Image

Raspberry Pi LED Blueprints

By: Agus Kurniawan

Overview of this book

Table of Contents (14 chapters)
Raspberry Pi LED Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with a 4-digit 7-segment display


After learning how to use a shift register with a 7-segment display, we are going to explore how to apply a shift register on a 4-digit 7-segment display. In general, a 4-digit 7-segment display consists of four 7-segment display modules. You can see this module scheme in the following figure (source: http://www.g-nor.com/html/GNQ-5643Ax-Bx.pdf):

You can see that four 7-segment display modules have been connected and shared on a, b, c, d, f, g, and DP pins. To display the first digit on 7-segment, you can set a value high on digit-1 (DIG 1). Otherwise, you can display the second digit on 7-segment by setting a value high on digit-2 (DIG 2). It means only one 7-segment display is running. You can run all 7-segment displays by manipulating the delay shown on this module.

For a sample illustration, you can see how to display a 4-digit number on this module. To achieve this, we need two 74HC595 shift registers. These chips are formed as cascading shift...