LED Segment and Matrix Driver how does it really work?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiMo_1418271
Level 1
Level 1

So, I've been reading the component docs and looking at the example code for the LED Segment and Matrix Driver, but I still don't understand how it works.

If I use a LED driver chip, usually it has either common cathode or common anode pins and then a bunch of pins for the opposite.  Let's say it's common anode.  I connect all the anodes of my 8 LEDs to the common anode pin and then connect each LED cathode individually to the cathode pins of the chip.  Then you can control the brightness using whatever API the chip provides (usually it does it internally via changing the PWM duty cycle).  This makes complete sense.

However, I can't figure out how the commons and segments work in the psoc driver.  The docs say that brightness will change the duty cycle of the common; but after hooking up a logic analyzer, it's changing the segment duty cycle instead and the commons duty cycle stays at a specific level somewhere around 10%.  Either commons or segment can be set active high or active low.  How would I use this for a common anode, individual cathode setup with brightness control of each led?

From the docs I figured that I would need to setup 8 commons and one segment.  And from the example project, it shows both set as active high connected to a multi-digit 7-segment LED display.  It says nothing about which is the anode and which is the cathode.  So I have no idea how I should hook this up to my actual LEDs and what the "active" settings should be.  Can anyone help me?

Thanks,

-m

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I must admit that I have no experience with the LED matrix component, but as I understand that matter:

You will need an external driver for the commons (might be a transistor). GPIO pins are able to drive/sink up to 10 mA which would result in different brightness depending on the segments of the digit switched to "on".

Common anode or common cathode is then selected by the circuit that drives the commons and the polarity set for the segment driver.

Bob

0 Likes

The example shows all the commons hooked directly to the 7-segment LEDs.  But doesn't make clear which are anodes or cathodes and both actives are high.  After some messing around I found something that somewhat works but doesn't work well so I think I'm still looking for the right answer.

What I have set up now is:

8 LEDs, common anode connected to the Segment pin, cathodes are connected to 8 different Commons pins (yeah, that sounds opposite of what you'd expect but you can only set brightness on commons and I need to do individual brightness on each led).

Segments are active high.  Commons are active low.

The intensity is not what I thought it would be.  Maybe it's because there are 8 coms and the refresh rate is not great. I will have to try using an external clock and bump the rate.

I'm still hoping someone will have a good answer to how this component is supposed to be used properly.

0 Likes

The intensity is not what I thought it would be.

As I said, use a driver and resistors for the segments.

Bob

0 Likes