Is it possible to use the PWM modules of PIC 18Fxx31 uCs and how?
Thanks in advance
Is it possible to use the PWM modules of PIC 18Fxx31 uCs and how?
Thanks in advance
Hi, dirace
Your answer is YES, using the HPWM function ( simpler ) , as they are supported by the 2.45 release , or using assembler ...a bit trickier.
Alain
I use the following code:
Define OSC 4
hpwm 0,127,2000
hpwm 1,127,1500
go:
Pause 50
goto go
This outputs PWM on RC1 and RC2 where CCP1 and CCP2 is and not on RB0 and RB1 where PWM0 and PWM1 is.
And both signal are 1.5KHz!!!
What am i doing wrong?
Just read manual : HPWM1 AND HPWM2 use the same clock ( TIMER 1) ...
so, it's the same PWM frequency .... with PBP or Assembler !!!
Alain
Bookmarks