pwm

Discussion to talk about software related topics only.
Post Reply
GreenE
Posts: 5
Joined: Tue Feb 22, 2011 1:39 pm

pwm

Post by GreenE »

Hey Guys,
I am working on an application which involves controlling a valve with PWM signal. The " MOD5213PWMdemo" example was helpful as far as learning about pwm registers. Are there any other examples available for mod5213?
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: pwm

Post by Ridgeglider »

joepasquariello
Posts: 85
Joined: Mon Apr 28, 2008 7:32 am

Re: pwm

Post by joepasquariello »

GreenE,

I posted a 5213 PWM test program to the application forum.

It's a PWM test program I wrote for the MOD5213 a couple of years ago. It configures PWM output on PWM0 and counts pulses on DTIN3. The function for setting up PWM0 is general enough to allow setting clock frequency, PWM periods, and duty cycles, but it's up to you to choose values that "make sense". The example shown should give you a good start.

When setting register bits, I use the macros in FreeScale's standard header files for the 5213. You can download them from FreeScale by searching for "MCF5213 header files". I just put all of headers into the MOD5213\Include folder, and since that's in the standard include search path, you don't have to change any settings in your NBE project.

Let us know if it's helpful.

Joe
Post Reply