I am in way over my head. All of a sudden I find myself declared the
Expert on my project, this happened
when I was not looking :(.
I am currently involved on a project where I am supposed to program a
DSP56F805 dev board for PWM independent
I need ~200Hz PWM period with edge aligned independent operation of 4 PWM
channels (PWM0 - PWM3).
Without using the DSK(I can't figure that stuff out), I need the
initialization code to set up the PWMA module. I have a sort of hello
which runs using Metrowerks and dev board but whatever I try I cannot seem
to get PWM operational.
Please if there is a kind sole who could send me some code (Well
Documented) or post here, that would operate the PWM
it would really help me out.
Many Thanks In Advance,
Mitchel J. Stein (Mitch)
Philips Research USA
345 Scarborough Rd.
Briarcliff Manor, NY 10510
Phone: (914) 945-6427 Fax: (914)945-6014
** NOTE- My opinions are just that, "MINE", and they do not reflect those
of my employer **
Help with DSP56F805 PWM etc.
I got a good chuckle out of your post, thanks.
There are a lot of settings to make for the PWM
to actually output something. I've struggled
myself. The code below is what I use to init my
pwm-A. It uses some of the low-level SDK stuff.
It sets up only 2 channels for pwm but it could
get you started (the other channels are software
controlled outputs). Read and re-read the PWM
chapter of the DSP User's Manual for more info
on the registers and bit assignments and operation.
//set edge and independent channels, all (no dead time)
//disable all faults
//Clear pending faults
//enable pwmA0-5 outputs (bit 15).
//enable software control for led tests of pwmA5-2 (bits 13:10).
//pwmA1-0 are for bulk ps control
//pwm resol. 10 bits (39khz)
//initial fwd dc = 50%
//initial rev dc = 50%
} // InitPWMs