28X1 Hpwm

retepsnikrep

Senior Member
I have searched and looked at various post on this issue but my specific questions is this.

Can I use Outputs 1 and 4 for seperate HPWM outputs running the same 5khz frequency but with different variable controlled mark space ratios from 0 to 100%?

I have various outputs on the other designated Output pins so I don't want to disturb those, the hpwm masking code is a bit confusing can someone please show me an example for the above?

I don't want to use the pwm pins 1 & 2 on the Input side.

Thanks Peter
 

kevrus

New Member
A quick glance at the datasheet suggests to me that HPWM in single mode will allow you to use just outputs 1 & 4 with the correct bit mask, but I think that the HPWMDUTY command would change the duty cycle on both HPWM outputs simultaneously...

hpwm 0,0,%1100,199,400

should give you HPWM outputs on 1 % 4 at 5khz with a duty of 50%
 

hippy

Technical Support
Staff member
HPWM allows a single PWM ( one frequency, one duty rate ) to be routed to any number of the four output pins, it doesn't give four independently controllable PWM's.

HPWM's primarily purpose is to make a single PWM more easily interfaced to an H-Bridge.
 
Top