SN74HC595 Multiplexed 7 seg LED display

Post and discuss new components that you have created.
Post Reply
mnfisher
Valued Contributor
Posts: 1864
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 882 times

SN74HC595 Multiplexed 7 seg LED display

Post by mnfisher »

A simple display (4 digit) using a shift register.

A couple of points:

1) Pull the OE (output enable) pin to ground either in code or in hardware.
2) Multiplex needs to be called regularly - ideally use an interrupt - as per demo. However it could be called in a loop (with a delay). Something like 240Hz is ideal. Setting up a timer interrupt for each MCU is slightly tricky - so left to the user here.
3) Multiplex bit-bangs the data to the shift register. I tested on an Arduino (16MHz) - there is a a chance that some MCUs might be too fast - add some 1uS delays (in the code but disabled here) I've not tested this - it might cause issues on some MCUs (esp32) depending on how the delay is implemented in FC.
4) The display needs to be connected to the shift register segment A to Qa - B to Qb etc with dp to Qh. Assuming standard segment layout. For common cathode the component inverts the data - not tested (I don't have any displays like this) - polarity can be set in properties.

The Display macro takes a decimal point position - and attempts to 'pad' with 0s rather than have leading spaces (so 0.001 not "0. 1" or " . 1")

Negative numbers are not handled (nor the possible 7 seg character set (A, B, C, E, H, L etc)))

It simulates (sort of) - the 2d panel component just displays the value...

Martin
Attachments
SN74Display.fcpx
(2.94 KiB) Downloaded 28 times
SN74_Test.fcfx
(10 KiB) Downloaded 24 times
ShiftReg.fcfx
(22.23 KiB) Downloaded 26 times

Post Reply