I am having trouble using the HPWM in FULL mode.
I should be very happy to hear your views as I have wasted all afternoon!
My chip is 20X2 @8Mz
I want to control the duty using an adc output.
My problem is that I only get 1 pwm output on C.5 whatever numbers I use in the HPWM statement.
my code is
dirsC= %0011100
dirsb = %0000100
HPWM 3, 2, 0, 200, 400
adcsetup = %00000001
MainLoop:
input b.0
readadc10 1, w4
HPWMDUTY w4
pause 1
goto mainLoop
I should be very happy to hear your views as I have wasted all afternoon!
My chip is 20X2 @8Mz
I want to control the duty using an adc output.
My problem is that I only get 1 pwm output on C.5 whatever numbers I use in the HPWM statement.
my code is
dirsC= %0011100
dirsb = %0000100
HPWM 3, 2, 0, 200, 400
adcsetup = %00000001
MainLoop:
input b.0
readadc10 1, w4
HPWMDUTY w4
pause 1
goto mainLoop
Last edited: