Two different frequencies with HPWM question
Using an 18F6722
It has three ECCP's
In the help file it states "Some devices have 1, 2 or 3 PWM channels. On devices with 2 channels, the Frequency must be the same on both channels. "
Does this mean with the current chip I can do two different frequencies? If so, I haven't been able to figure it out yet. Any ideas?
DEFINE HPWM2_TIMER 1 'Hpwm 2 timer select
DEFINE HPWM3_TIMER 2 'Hpwm 3 timer select
HPWM 2,127,20000
HPWM 3,127,30000
I can get individual HPWM's to work. When I fire both up though I get random flat lining. I have tried HPWM1 and HPWM2, then HPWM1 and HPWM3 plus HPWM2 and HPWM3 combinations.
Re: Two different frequencies with HPWM question
Section 1.2 says you can have up to 4 different time bases.
I can only think that you are forgetting to set a register.
Robert
Re: Two different frequencies with HPWM question
Thank you that helped. I found the right register and I think I have it sorted out.
T3CON.6=0
T3CON.3=1
Took care of it.