I am using CY8C28445. I am facing problem with TIMER. I want to generate 1 Hz to 40 Hz signal in two pins and change PWM signal with certain period of time.
TIME | PIN0 Freq. | PIN0 PWM | PIN1 Freq. | PIN1PWM | Alternate Mode
T0 | 2Hz | 50% | 2Hz | 50% | 0
T1 | 3Hz | 50% | 15Hz | 20% | 0
T2 | 30.5Hz | 40% | 2.5Hz | 50% | 0
T3 | 2Hz | 50% | 2Hz | 50% | 1
Alternate Mode activate gives 180 degree phase shift b/w PIN0 and PIN1.
You need two PWMs and a Timer.
Use the timer with a corresponding interrupt and count smallest time to have a clock. At the different Tn caunts set the PWMs period and compare value accordingly. For the phase shift load PWM2's initial count-register as required.
When the board-count of the project is small, the impact of using a not-so-cheap chip will be supressed by the state-of-the-art CPU-design the PSoC4 or PSoC5 devices have got. So when you are free to choose I would always consider using one of those chips.