I am getting an error titled number of Macrocells exceeding (max=32, need=36)... How do i address this?

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

cross mob
Anonymous
Not applicable

I am a rookie at best with PSoC ... can some one give me some direction of how I address the Macocells exceeded.  I have attached my project for review.

Scott

0 Likes
1 Solution

scott,

Attached is a demo project showing operation of the custom component (Button_SW) for debouncing switch buttons. The component is written entirely in code and does not consume PLD/UDB resources, and can handle up to 8 buttons on a single port. This is a draft version of the component meaning it may need more testing and is subject to changes in the future, and no datasheet is available yet. Component was tested using PSoC5LP and PSoC4200.

/odissey1

P.S. The final release version of the the component (+datasheet, App Note and demos for PSoC5 /PSoC4) can be found here:

ButtonSw32: button switch debouncer component

Button_sw_basic_PSoC4.png

View solution in original post

6 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Dave,

Macro cell is one of the building blocks of the digital components in PSoC. In your project the debouncer is causing the resource limitation. You can check your resource usage in resource meter.

pastedImage_0.png

you can check the de-bouncer datasheet to see how the resources are used.

pastedImage_2.png

You may have to reduce the number of debouncer inputs to resolve the issue.

Best Regards,
VSRS

scott,

There are two solutions: (1) hardware debouncing, (2) software debouncing.

1. Remove Debouncing component and attach small (0.1u) capacitors to each input pin. This should be enough. You can further reduce a number of ISRs used to one single interrupt, attached to a port.

2. You can use software for periodically polling input pins and to debounce signals by CPU with minimal overhead. See discussion and a demo project in

switch debounce

/odissey1

scott,

Attached is a demo project showing operation of the custom component (Button_SW) for debouncing switch buttons. The component is written entirely in code and does not consume PLD/UDB resources, and can handle up to 8 buttons on a single port. This is a draft version of the component meaning it may need more testing and is subject to changes in the future, and no datasheet is available yet. Component was tested using PSoC5LP and PSoC4200.

/odissey1

P.S. The final release version of the the component (+datasheet, App Note and demos for PSoC5 /PSoC4) can be found here:

ButtonSw32: button switch debouncer component

Button_sw_basic_PSoC4.png

Anonymous
Not applicable

Thank you for the  explanations and suggestions!

0 Likes

Scott,

You are welcome. But  did it work for your project? Since it is early beta component, I am interested in feedback.

/odissey1

0 Likes
Anonymous
Not applicable

I was able to resolve my issue by removing a timer and a PWM I was not using in this solution.  I will load up your component and give it a test in my application.  At moment laying out the board.  I just have to add a couple of smart high side load switch's and i am ready to go.

Scott

0 Likes