CY8CKIT-043 Question

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

cross mob
RiKn_1565556
Level 2
Level 2

Hello All,

   

I am continuing to experiment with my -043 kit, mostly using  the sample code provided to help get a feel for how the device works and perhaps to even get some some flashes of inspiration as to how I might better use it.

   

As part of this work, I've extended the "breathing LED" example code to use multiple LED's at different frequencies and duration rates.  To do this I've just been adding PWMs. 

   

When I got to PWM_4 and PWM_5 however, the compiler began to complain with a cryptic error message about it not having a 'valid placement for pins or for a functional block'. 

   

My first thought here is that there may be a limitation as to the number of PWM's that I can invoke, however in browsing around the web I've seen some articles suggesting that up to 24 PWM outputs are available with the psoc4 family.

   

So am I misunderstanding something, or is there some 'secret sauce' involved in using more than 4 PWM's?

   

Rich

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

PWMs are built using SCBs (Serial Control Blocks)  and UDBs (Universal Digital Blocks). In PSoC4 there are 4 8-bit wide UDBs and four SCBs with dedicated pins. So only in a PSoC5 which has got 24 UDBs you may increase the number of PWMs up to >20.

   

When you want to start with PSoCs I would suggest you to use the internal USBV-UART bridge and get a connection to your PC screen using PuTTY (works like a charm!). Quite more helpful than just blinking. A nice experiment would be to use the PrISM component to control an LEDs brightness...

   

 

   

Bob

0 Likes
RiKn_1565556
Level 2
Level 2

Thanks Bob, that answers my question.  Thanks also for the suggestion, I'll look at it.

   

Previously, I had gotten the UART serial comms working ok, and this flashing LED experiment was just to learn a little more about how the PWM's behave using various settings and speeds (as well as to possibly stress test the board to see if I stumble any issues with latency when heavily loading a function.  So far, the only latency I've noted is in the grey matter of this developer (grin).

   

Rich

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

To stress your dark gray matter a bit more: the USBs are a digital source of surprise. With the only downgrade: you have to understand them. There is a HDL (Hardware Description Language) that can be used to configure them into whatever fits into. They contain a programmable ALU, two FIFOs a handful of registers and some glue logic. It's just like a digital hardware experimental kit...

   

So, when you understand PSoCs, there is quite a lot more you may try to grok!

   

 

   

Bob

0 Likes