The issue to control 74HC595 with driver CD4511 for LED 7 Segment

I want to show the Number of LED is ON via LED 7 segment.
I control LEDs via 2 ICs 8bit 74HC595. and using driver CD4511 for LED 7 Segment.
My issue:
When I press button, the LED 7 Segment is show correct number but the LED out on 74HC595 is not Bright.
When is disable the the code for LED 7 Segment (disable Switch case) is LED out on 74HC595 is Bright.
I am simulation it => I don’t know the issue by tool to Simulate or my CODE have issue.

Can you tell me know what’s my issue?
Thanks and best regard.

I connected like this.

And code:

Code.txt (5.5 KB)

it's not clear how your circuit is wired. it's common to multiplex multiple 7-segment displays and drive each segment directly and the duty cycle determines the brightness.

looks like you're may or may not be using the 595 to set bits on multiple cd4511s. can you explain what the code is trying to do?

Yes, that seems like overkill. You could actually do 4 digits with a single 595 and a 4011, since you could latch both the 4 digit enables and the 4 inputs to the 4011, in one 8 bit register.

Your image upload failed. Try adding it as an attachment. Also please post your code inline in your message, using the code tags, instead of just attaching it.