
Originally Posted by
Darrel Taylor
Hmm, I don't see the CMCON and ANSEL in your program.
There's a R-M-W (Read-Modify-Write) problem when OUTPUTting to a pin set to Analog. It adds a high frequency component to the PWM signal.
Would the following be correct
Code:
TRISIO.2 = 0 'Set GPIO.2 to output.
ANSEL.2 = 0 'Set GPIO.2 to digital
GPIO.0 = 1 'gpio.0 set to input
VRCON = 0 ' Voltage reference disabled
OPTION_REG.7 = 0

Originally Posted by
Darrel Taylor
6.5V at full speed? That doesn't sound right. The current is getting limited somewhere. Maybe if you increased the value of R4 ????
I'll try that and see what happens, thanks for the suggestion
Bookmarks