• AVR Freaks

Hot!PWM PWM2H not reponding to PDC2 = x Commands

Author
Watter
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)
0

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!
#1

0 Replies Related Threads

    Jump to:
    © 2019 APG vNext Commercial Version 4.5