Last night there were a couple people that wanted to start messing with the
PWM functionality, as such, the first C version of the pwm code is attached.
You'll need to tweak your make files accordingly.

To get the PWM's going, something like the following would work.
   PWMinit(0, 0x400);
   setupPWMChannel(PWM2, 0x250);
   setupPWMChannel(PWM5, 0x100);

and dynamically change the duty cycles with somthing like this:
   setPWMDutyCycle(PWM5, 0x150);

Note: I've only tested pwm channels 2 and 5 as they are pinned out on the
dev board. The others should work as the code is ridiculously simple, but I
haven't tested them yet.


On a separate subject, I'd like to get all this checked into source control.
Who would I talk to to get that setup?


Thanks,
-Dave

Attachment: pwm.c
Description: Binary data

Attachment: pwm.h
Description: Binary data

_______________________________________________
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics

Reply via email to