1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Use this section to discuss your embedded Flowcode projects.
andeug
Posts: 69
http://meble-kuchenne.info.pl
Joined: Thu Jan 07, 2021 1:42 pm
Location: Stockholm (SE)
Has thanked: 23 times
Been thanked: 2 times

Flowcode v11 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by andeug »

Hi,


I am working on building a digital clock that uses an STM32 Nucleo and a TPIC6B595 (instead of a 74HC595), with MOSFETs driving each digit.
The display is a Vishay TDCR1050M, common anode, for which I am enclosing its datasheet below:
TDCR1050M.pdf
(240.22 KiB) Downloaded 30 times
I am using this particular display because it has a digit for degrees Celsius (L3), a column (L1 + L2) for blinking seconds, plus DP for an active alarm. Also, the display and such setup have fewer pins, as it is optimized for a multiplexed setup.
Screenshot 2026-02-11 at 15.05.57.png
Screenshot 2026-02-11 at 15.05.57.png (116.92 KiB) Viewed 753 times
How do I use this kind of display in Flowcode 11, when the default component for a 7-segment display already contains 74HC595 shift registers for each digit, rather than a single shift register (TPIC6B595) for all the digits, and multiplexing for each digit? I do not know how to use multiplexing - can someone please show me via a Flowcode file how it should be done?


Thank you,
Andreas
FC11 Professional + ARD + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG

mnfisher
Valued Contributor
Posts: 1864
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 882 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by mnfisher »

Multiplexing - you need to 'turn on' the individual segments for some of the time - rapidly switching between the different digits by connecting the common (anode or cathode)

Have a look at https://www.flowcode.co.uk/forums/viewt ... g&start=10

Martin

andeug
Posts: 69
Joined: Thu Jan 07, 2021 1:42 pm
Location: Stockholm (SE)
Has thanked: 23 times
Been thanked: 2 times

Flowcode v11 Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by andeug »

Does anyone know how to create a schematic of the display for my clock project in Flowcode?
Digital clock schematic.pdf
(58.01 KiB) Downloaded 26 times
Screenshot 2026-02-21 215921.png
Screenshot 2026-02-21 215921.png (199.8 KiB) Viewed 319 times
There is no component for the common anode display setup I am using.
FC11 Professional + ARD + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG

chipfryer27
Valued Contributor
Posts: 1945
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 425 times
Been thanked: 646 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by chipfryer27 »

Hi

Not sure I understand your question as you seem to already have a schematic diagram showing all connections.

If you mean do we know offhand the internal components of the display module and how they are connected, probably not. However some manufacturers including Vishay often provide a schematic as part of their datasheet, so check there.

Regards

andeug
Posts: 69
Joined: Thu Jan 07, 2021 1:42 pm
Location: Stockholm (SE)
Has thanked: 23 times
Been thanked: 2 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by andeug »

My question is how do I work with this display schematic in Flowcode. Unfortunately there is no display component that represents this schematic, and maybe there is a workaround which I can use…
FC11 Professional + ARD + ARM license + Matrix TSL E-blocks2 boards
Mikroe Click boards + Click Shield for ST Nucleo-32 + Clicker 4 for ST STM32F407VG

chipfryer27
Valued Contributor
Posts: 1945
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 425 times
Been thanked: 646 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by chipfryer27 »

Hi

In other posts you mentioned about the 6595 and I questioned the need for such, as you will only ever be drawing a fraction of it's capability. Any of the existing shift-registers (e.g. 8574) that are supported would be able to handle your requirement with ease.

From the other posts you mention that you intend to use the 1050 due to it's extra "segments" L1 - L3, and I informed that you would either need to allocate two or three extra pins to control these segements independently (only two if L1 and L2 are on at same time), or if pins are unavailable allocate another 8-bit register purely for these segments. I see you have commoned L1 & L2 and are using dedicated pins.

Again in a previous posts I outlined the "rough steps" to displaying https://www.flowcode.co.uk/forums/viewt ... 009#p23009

Although not having your shift-register to test with you could most likely use any of the following to clock out data:-

1) SPI Master components with RCLK connected to CS. Examples of using such in WiKi.
2) I2C with you manually controlling RCLK. Examples of using such in WiKi
3) Simply create your own routine looping to send 8-bits, using Output icons to control pin status and appropriate delays.

Again as per previous post have CA1 - 4 On/Off based on a timer (e.g. 20mS but I have no idea of value to use).

Send your bits for digit-1
Enable CA1
Manually set L1 - L3
Delay (go do something else)
Repeat for digits 2 - 4

Regards

mnfisher
Valued Contributor
Posts: 1864
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 882 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by mnfisher »

I had a play with this...

This is a first idea - and as Iain says using CS as RCLK seems to work well...
I use an interrupt to multiplex the displays - the character set is a rough attempt with QA connected to segment A, QB to seg B etc)

I found an interrupt rate of 244Hz worked nicely (each digit refreshed at ~60Hz) - these displays are not very breadboard friendly! - I used resistors on the 4 digit select pins - instead of on the segment pins (so brightness varies slightly).

I used a F3561AH 4 digit display and a Sn74HC595 shift register. I ignore the DP - but it could be connected to QH.
I used an ATMega328P (Arduino Uno) but it should work okay on other MCUs - the proviso being that SPI can be used in an interrupt. On the Arduino it only works with SPI using the software channel (and it might be as well just to bit-bang this rather than using SPI).
I also connected OE (output enable) - this could possibly just be pulled to ground.

It would also be possible - originally I intended to do this - to use multiple shift registers to do 8, 12 or more digits. Commons would be connected to 1,5... and 2,6 etc and select the appropriate digits to output.. The wiring was too daunting tho' :-(

Martin
Attachments
ShiftReg.fcfx
(24.29 KiB) Downloaded 10 times

mnfisher
Valued Contributor
Posts: 1864
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 882 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by mnfisher »

Pins for CA0 (probably should be CA1 ?) - CA3 etc are in properties. It's all Flowcode - but doesn't attempt to simulate (although you can look at what is being sent to the shift registers and the common pins in multiplex)

Martin

mnfisher
Valued Contributor
Posts: 1864
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 882 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by mnfisher »

The 'trace' showing the 'common' pins.
LabNation_Screenshot48.png
LabNation_Screenshot48.png (163.83 KiB) Viewed 151 times

mnfisher
Valued Contributor
Posts: 1864
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 882 times

Re: 1x 74HC595/TPIC6B595 via SPI interface, driving multiplexed 4x 7-segment display

Post by mnfisher »

A rather busy breadboard !
disp_led.jpg
disp_led.jpg (185.2 KiB) Viewed 145 times

Post Reply