• AVR Freaks

Hot!PWM PWM2H not reponding to PDC2 = x Commands

New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2019/06/10 01:13:11
  • Location: 0
  • Status: offline
2019/08/13 08:43:37 (permalink)

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! 
Any ideas?
Please find code attached!

0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 4.5