COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
andeug
Posts: 60
http://meble-kuchenne.info.pl
Joined: Thu Jan 07, 2021 1:42 pm
Location: Stockholm (SE)
Has thanked: 19 times
Been thanked: 2 times

Flowcode v11 COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by andeug »

Hi,


I am working on the project below, and I would need a dedicated component for it:

https://www.flowcode.co.uk/forums/viewtopic.php?t=3615

In my context,

• TPIC6B595 sinks current for the 7-segments of one digit + DP
• P-MOSFETs switch digit anodes
• MCU handles multiplex timing

Otherwise, how can I implement the existing components from Flowcode's library, and which ones should I use?
Does anyone have any examples that would fit my needs to understand how they work?


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: 1855
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 875 times

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by mnfisher »

Have a look at

viewtopic.php?t=3494

And

viewtopic.php?t=3613

Which deal with (different) LED driver chips - I'm pretty sure the techniques required will be similar.
If you have difficulties I'll try and help..

Martin

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

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by andeug »

Martin, I need something that uses my specific setup. and not HT16K33, MAX7219, or something else...
I wish the component I need existed already, since 7-segment multiplexing is quite popular.
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: 1855
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 154 times
Been thanked: 875 times

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by mnfisher »

yes, I see that - however, the principalswill be very similar.

chipfryer27
Valued Contributor
Posts: 1912
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 415 times
Been thanked: 641 times

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by chipfryer27 »

Hi

Following on from Martin, I am a little confused as to what you want to do.

The display is "multiplexable" in that each segment in each of the four digits is commoned, but each digit is uniquely addressable. The display could be driven by any reasonable microcontroller and a few transistors (assuming it has enough pins).

Basically you would :-
Set the segments for digit-1, then enable D1 for say 20mS before disabling (note I have no idea of min on/off time)
Set the segements for digit-2 then enable D2 for say 20mS before disabling
Same for digits three and four
Repeat above.

However you also mention using a shift register. Not sure why unless your microcontroller doesn't have enough pins.

Kind of same as above
Clock the segements for digit-1 into the register and enable. Enable D1 for say 20mS then disable.
Repeat for each digit
Repeat the above.

I'm sure the WiKi has examples of muliplexing two (or more) digits directly, as you could potentially do. You could probably modify that to send out to the register if you really want to use it.

Regards

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

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by andeug »

I want to use a shift register, TPIC6B595, because:

- Can sink 150 mA per output;
- Handles LED multiplexing peak currents safely;
- Protects MCU from LED load;
- Only 3 SPI pins needed;
- Is daisy-chainable, if I need more digits in the future, like a 14/16 element display

The microcontroller is an ST STM32-Nucleo, so I have a limited number of pins; it is essentially the equivalent of an Arduino Nano.

I will review the Matrix TSL pages to see how each digit is addressed, but for the segments, I intend to use TPIC6B595.

Also, what is the symbol/component in Flowcode when I use addressing for each digit?
Last edited by andeug on Wed Feb 11, 2026 8:39 pm, edited 1 time in total.
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: 1912
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 415 times
Been thanked: 641 times

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by chipfryer27 »

Hi

I've looked at the components and they appear to be very similar to what you want to do, but obviously you would also need pins for L1/L2/L3.

The 4-digit display components are to a great extent quite user friendly, just add in extra pins for L1-L3 (or common L1+L2 if both on together).

Perhaps in your Main loop do whatever and update D1+dp / D2+dp etc plus L1-L3 to whatever value as needed.

Have a timer interrupt at perhaps 20mS (again I have no idea of a suitable refresh rate). Have a counter within your ISR incrementing each time it is called. Start at 1 (for digit 1) and then set segments for Digit-1 and enable. Then increment counter.

Next itteration count will be 2 so it will set segments for Digit-2 etc. I'm sure you get the idea. Reset counter once 4th digit has been set.

You may just want to set a flag in your ISR and look for that in your Main loop. If found branch and action etc

I have numerous "Combo Boards" but not near me so I can't give you an example, and this could only be "multiplexing" using pins, not shift register, but that should not be hard to incorporate.

I don't think what you want to do will be too hard to achieve.

Regards

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

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by andeug »

Thank you for the in-depth explanation.

Do you know which symbol/component in Flowcode I should use when addressing each digit? I am talking about a case where I would use TPIC6B595, and each digit would be addressed via a MOSFET. Is there a dedicated one for GPIO? (I was not able to find)
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: 1912
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 415 times
Been thanked: 641 times

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by chipfryer27 »

Hi

I can't say for certain but I would first try all the 4-Digit serial displays and see what happens. In their properties you can set appropriate pins. That would most likely solve the segment / digit issue, then just set L1-L3 as an "extra" as appropriate. You will need pins for these LEDs as your shift-register won't support.

Regards

chipfryer27
Valued Contributor
Posts: 1912
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 415 times
Been thanked: 641 times

Re: COMPONENT REQUEST: display using 1x 74HC595 and configurable 7-segments digits with multiplexing

Post by chipfryer27 »

Hi

I would need to check how your register works though, but generally speaking they all work on same principles more or less. Clock out the value and set.

Post Reply