last code still not working
Again i hear a buzz, and sometime the motor turns a little.
Also on the oscilloscope, sometime he output is sitting at zero, or when its oscillating, it looks like its going from -4 to 1volt

if right > left Then
temp =right-left
temp= temp * 254
temp= temp/right
PORTC.4=0
PORTC.5=1
HPWM 1,255-temp,2000
HPWM 2,255,2000
Endif

if left >= right then
temp =left-right
temp= temp * 254
temp= temp/left
PORTC.6=0
PORTC.7=1
HPWM 2,255-temp,2000
HPWM 1,255,2000
Endif