I'll try out your suggestions tonight when I get home, Darrel - thanks.
Just to confirm: you used code like this?
Code:
DEFINE OSC 20 ' Set oscillator 20Mhz
#CONFIG
__config _CONFIG1, _FOSC_HS & _WDTE_ON & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF
__config _CONFIG2, _PLLEN_OFF & _STVREN_ON & _BORV_LO & _LVP_OFF
#ENDCONFIG
ANSELA = %00000000 ' Digital only (PortA)
ANSELC = %00000000 ' Digital only (PortC)
ADCON1 = $0F
TRISA = %00000000 ' Make all pins on PortA output
TRISC = %00000000 ' Make all pins on PortC output
' Set CCP modules to PWM mode
CCP3CON = %00001100 ' Mode select = PWM
HPWM 3, 127, 20000
lblLoop:
Pause 1
GoTo lblLoop
End
Bookmarks