Stuck creating PWM on dsPic33fj128GP306A

Thread Starter

jens09

Joined Oct 2, 2013
1
hey,

I must create a PWM on a dsPIC33fj128GP306A with MPLab X c16 compiler.

my config bits are:
Rich (BB code):
_FOSCSEL(FNOSC_FRC) //set clock for internal OSC with PLL
_FOSC(FCKSM_CSECMD & OSCIOFNC_ON & POSCMD_NONE) //no clock output, external OSC disabled
_FWDT(FWDTEN_OFF) //disable the watchdog timer
_FPOR(FPWRT_PWR128)
_FICD(JTAGEN_OFF & ICS_PGD2); //disable JTAG, enable debugging on PGx2 pins
The code that I use for initializing the output compares and how I set the duty cycle can be seen in the attachment.

The voltage at the connectors for the electromoters remains 0V. Anyone sees what I am doing wrong?

Thx in advance,

Jens
 

Attachments

Top