PWM PWM2H not reponding to PDC2 = x Commands
Hi there, any help is appreciated.
Currently writing my first piece of code for a dsPIC33FJ16GS502. I have PWM1H working as intended via case statements (may not be the best way to do it but i am learning!). It is outputting a set PWM profile i have defined.
The problem lies with PWM2H. I've set PDC2 = 7 (Roughly 10% of 'PHASE2' in the first case statement) so am expecting a 10% duty cycle at 400kHz on pin 23. However, Pin 23 remains ON at a 100% duty cycle despite me changing the value of PDC2!
Please find code attached!