Hi, thanks for the reply.. I got it working in the end.
The thing that I was doing wrong was having a larger duty cycle value in PDC0L and PDC0H than the value in PTPERL and PTPERH. Since the PWM module counts upwards until it reaches the duty cycle value, and then continues to count upwards to the end of the frequency cycle as determined by the values in PTPERx registers, PDCxx must be lower than PTPERx.
Thanks again,
Andy




Bookmarks