LED_Driver with 10 commons: how it is possible?

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

cross mob
lock attach
Attachments are accessible only for community members.
scricciolomatti
Level 1
Level 1
5 sign-ins First reply posted First question asked

Good morning,

how you can see on attached file, I would to pilot 10 7-segment displays with LED_Driver block.

I can't use a second LED_Driver because the 7-segment are commons and Creator give me an error.

Is there a way to use LED_Driver block with 10 commons?

Thanks for all your helps.
Mattia Scricciolo

0 Likes
1 Solution

Mattia,

Here's some information about the COM drive DMA sequence.

  1. In effect each COM pin is being driven active one at a time.   For a short time, ALL COM pins are inactive.     (This is the small blanking phase where NO COM is on).   The COMs are off to prevent a ghost image from the previous digit's segments from appearing in the next digit.
  2. The DMA loads the Segments in the segments Control register for the next digit.  
  3. Once the segments are loaded, the COM pin for that digital is turned on for 'x' time.
  4. Steps 1 through 3 are repeat for all the COMs (digits).
Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

7 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Mattia,

I placed two LED_driver components on a schematic sheet.   I get no complaints.

It is possible you are running out of resources based on other components on other schematics pages in your TopDesign.

It should be possible to modify the LED_driver component to allow for 10 commons.

Before you proceed down the LED path, take a look at another thread about LED and drive requirements on this forum:  PSOC-5LP-Schematic-and-firmware-design-support-to-drive-Segment 

Len
"Engineering is an Art. The Art of Compromise."
lock attach
Attachments are accessible only for community members.
scricciolomatti
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hello Len, thanks for your reply.

As you can see attached, if I try to use a second Led Driver will be an error due to the 7-segment signals (that are in commons).

For the modification to the component, I can try it.

Thanks.

0 Likes

Mattia,

The issue you are having is that you are trying to drive the segments with both LED_drivers.   The Application build phase is saying that you can't have multiple drivers on the same line.

My recommendation: Modify the component to support 10 digits.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
lock attach
Attachments are accessible only for community members.
scricciolomatti
Level 1
Level 1
5 sign-ins First reply posted First question asked

I'm trying to modify the component but I need help.

I created a new project library, import the component and now I can use it on my project. 
I changed MAX_COMMONS parameter in cyparameter.cs and changed the block schematic as attached. 

Now, if I try to change commons with a number upper than 8, I have the error attached. 

Do you know what I have to change again?
Thanks for your support, 

Mattia Scricciolo


0 Likes

Mattia,

You've done a good job of extending the number of COMs so far.   As you can see it is not easy....

...

Now, if I try to change commons with a number upper than 8, I have the error attached. 

Do you know what I have to change again?
...


To get rid of the error you have to change the Validators for NumCom formal parameter.

To make the change

  • open the .cysym file. 
  • Right-click over the area outside the symbol and select "Symbol Parameters..."
    Len_CONSULTRON_2-1611581536733.png

     

  • Select the "NumCom" formal parameter.Len_CONSULTRON_1-1611581360005.png
  • Select the "..." in the "Validators" field on the right.
  • Change the second item from "$NumCom <  9" to "$NumCom < 17" and "The maximum number of allowed common lines is 8." to "The maximum number of allowed common lines is 16.".
    Len_CONSULTRON_3-1611581850322.png

     

I wish that this was all that needs to be done.   You're not done.

The COM and SEG Control Registers are loaded using DMA loops.   Adding the additional COM Control Register needs to be coded into new TDs to be inserted into the DMA loop.

I asked in an earlier post:  Do you need to support LEDs?    The cost of a 10-digit matrix LED is coming very close to LCD displays with backlighting.  Depending on the Segment LED drive current, it may be needed to place external LED drivers (NPN and PNP transistors) adding to the cost.

For example, if your LED displays need 10mA per Segment for maximum brightness, then the COM needs to drive up to 8 Segments on with an accumulative current  of 8x10mA = 80mA.   This is going to be a challenge on the PSoC5 since one GPIO can sink 8mA or a SIO can sink 25mA.

I have purchased a 320x280 TFT Color LCD display with resistive touch screen and WiFi for $30.00 US.

Check out the link: 4D Systems : gen4-iod-24t .

Len
"Engineering is an Art. The Art of Compromise."
scricciolomatti
Level 1
Level 1
5 sign-ins First reply posted First question asked

Yes, I have to use 10 7-segment LED's because I'm upgrading an old product and I don't want to change it to the customer. For the current, I'm working with lower current and there is a transitor between LED and microcontroller.
I can' t use an LCD display.

The COM and SEG Control Registers are loaded using DMA loops.   Adding the additional COM Control Register needs to be coded into new TDs to be inserted into the DMA loop.

I have to study it. At this moment I don't know how to do it.
I will try it and then I will let you know. 

Thanks,
Mattia Scricciolo

0 Likes

Mattia,

Here's some information about the COM drive DMA sequence.

  1. In effect each COM pin is being driven active one at a time.   For a short time, ALL COM pins are inactive.     (This is the small blanking phase where NO COM is on).   The COMs are off to prevent a ghost image from the previous digit's segments from appearing in the next digit.
  2. The DMA loads the Segments in the segments Control register for the next digit.  
  3. Once the segments are loaded, the COM pin for that digital is turned on for 'x' time.
  4. Steps 1 through 3 are repeat for all the COMs (digits).
Len
"Engineering is an Art. The Art of Compromise."