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?


Attachment: pwm.c
Description: Binary data

Attachment: pwm.h
Description: Binary data

psas-avionics mailing list

Reply via email to