Sure enough Darrel!
I set up the CCPTMRS register to assign the timers, assigned the desired pins (code below) and away it went!
Now I've got two differing PWM frequencies and the DAC working great!
Thanks.
Somebody pinch me!
Code:CCPTMRS = %00100100 ' CCP1=TMR2,CCP3=TMR6 in PWM Mode Main: ' DEFINE CCP1_REG PORTB DEFINE CCP1_BIT 3 'pin 9 'DEFINE CCP2_REG PORTA 'DEFINE CCP2_BIT 7 'pin 16 DEFINE CCP3_REG PORTA ' DEFINE CCP3_BIT 3 'pin 2 'DEFINE CCP4_REG PORTA 'DEFINE CCP4_BIT 4 'pin 3 ' HPWM 1,127,400 'apparently uses timer2 by default 'HPWM 2,100,100 HPWM 3,127,1000 'assigned to tmr6 'HPWM 4,50,1000 ' goto dac_test




Bookmarks