#177 7-Segment Shift Drive
Test control of a 7-segment LED display via a 74HC595 shift register.
Here’s a quick video of the circuit in action:
Notes
While you can wire up each segment pin to a digital out on the Arduino as in the LED7Segment/DirectDrive project, it soon becomes pretty wasteful of pins. This project uses a 74HC595 8-bit shift register to feed segment values, requiring only 3 pins.
Since the 74HC595 has latched outputs, it also means all segment changes are simulataneous.
Register-Pin Mapping
Here’s a summary of how the bits in the shift register are mapped to LED segments:
Bit | Segment |
---|---|
0 | A - top horizontal |
1 | B - top right vertical |
2 | C - bottom right vertical |
3 | D - bottom horizontal |
4 | E - bottom left vertical |
5 | F - top left vertical |
6 | G - center horizontal |
7 | dp - decimal point |
However the code uses bytes to represent dp,G,F..A from MSB to LSB, so I use MSBFIRST transfer.
Construction
Credits and References
- LED7Segment/DirectDrive - similar circuit but with direct control
- 74HC595 Datasheet
- SC56-11 Datasheet
- Drive a 7-Segment LED with an Arduino