Do not change the period value, but change the compare value. So you can cover a duty cycle from 0 to 100%.
When you use an interrupt for your PWM you will be able to change the LED brightness within the handler. Is this what you are up to?
Thank you, Bob.
Oh, sorry, I meant the compare value, but accidentally wrote period value.
I just thought whether there is a way of doing this more in hardware, without the need of the changing the compare value. I am asking just out of curiosity.
Well, there is no component yet that does the job.
You could try to learn a HDL (Hardware Definition Languge) named Warp Verilog. Most PSoC4 have got 4 UDBs (Universal Digital Block) which can be programmed to do a lot of different jobs. Refer to the Cypress documentation (already installed on your computer) as Warp Verilog and the Component's Author Guide. I do not say that it can be done easily, not at all. But it is doable.
OK, thank you, I just wanted to make sure I am not missing some basic idea of logic circuits