center aligned PWM Problem

Status
Not open for further replies.

Arrowspace

Banned
Joined
Jan 23, 2015
Messages
186
Helped
3
Reputation
6
Reaction score
3
Trophy points
18
Activity points
0
I written a code for center aligned PWM using dspic30f but at output i am getting edge aligned PWM , can anyone correct my code .


PWMCON1 = 0b00110011;
PTCON = 0;
_PTCKPS = 0;
_PTMOD = 0b10;
PTPER = 600;
PDC1 = PTPER;
PDC2 = PTPER;
PTMR = 0;
_PTEN = 1;
 

Hi,

How do you know?

Center alingned is hard to detect, you need an extra trigger signal..

With a single channel scope i can't imagine how to do it.

Klaus
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…