PDA

View Full Version : Hpwm @ Pic16f777



fuhr3r
- 14th October 2005, 16:08
HPWM 2 and 3 not working. I`m using the same frequency for 1, 2 and 3.

Can someone helpme?

mister_e
- 15th October 2005, 14:24
is it me or you forget to post the code?

BTW..

look respective timer in use for each PWM module
Look PBP manual in the HPWM section DEFINE....
look for config fuse
Datasheet
goto step 1

NavMicroSystems
- 15th October 2005, 18:06
fuhr3r,

since you are new to the forum you should have a look at THIS (http://www.picbasic.co.uk/forum/showpost.php?p=8765&postcount=2)

fuhr3r
- 16th October 2005, 21:22
Hi, the code is very big, almost 8k and commented in portugueese

This PIC have 2 pins for CCP2, selected with the fuses, so does it need the DEFINES?

fuhr3r
- 18th October 2005, 00:35
DEFINE CCP2_REG PORTB ' Hpwm 2 pin port
DEFINE CCP2_BIT 3 ' Hpwm 2 pin bit

Now HPWM 2 works, but HPWM3 still not working.

I tryed DEFINE CCP3_REG PORTB and CCP2_BIT 5, but did not work. (only CCP has 2 choices of pins).

Tomorrow i will try simulate with MPLAB or put a LCD showing CCP3CON.

Nobody ever used 3 HPWMs?

fuhr3r
- 18th October 2005, 00:42
http://www.picbasic.co.uk/forum/showthread.php?t=1770

"Nope. The HPWM command only supports 2 channels. CCP1 & CCP2. You
would need to modify the 16F library to support CCP3. It's much easier to
just configure hardware PWM manually."

Problem solved....