2 HPWM's at different frequencies?
18F2550 running on external 20mhz resonator. I'm trying to get HPWM 1 to run at 30KHz and HPWM 2 to run at 1KHz. Both appear to run at 1KHz. Any way around this?
The 30KHz is being used for a boost switcher and the 1KHz is used as LED dimming on the output of the boost switcher.
Re: 2 HPWM's at different frequencies?
Quote:
Originally Posted by
jmgelba
18F2550 running on external 20mhz resonator. I'm trying to get HPWM 1 to run at 30KHz and HPWM 2 to run at 1KHz. Both appear to run at 1KHz. Any way around this?
The 30KHz is being used for a boost switcher and the 1KHz is used as LED dimming on the output of the boost switcher.
On that chip bot hPWM pin's uses Timer 2, so the frequency must be the same.
You can use Software PWM or change Chip.
Re: 2 HPWM's at different frequencies?
You could set the faster frequency (30K) and then add a divide by 30 circuit on the 2nd hpwm output to get the 1KHz. Think that should work.