hi henrik, thanks for explaining.
but i ve try ur method using below coding for 1 channel but the the output ccp wont work. its doesnt come out the correct dutycyle from the lookup table for my PWM.
below are the example of my coding:
For DUTY1 = 0 TO 44
LookUp DUTY1, [0,18,35,53,70,87,104,120,135,150,164,177,190,201,2 11,221,229,236,_
243,247,251,254,255,254,251,247,243,236,229,221,21 1,201,189,_
177,164,150,135,120,104,87,70,53,35,18,0],DUTY2
Duty1 = DUTY2 ' 50% duty cycle. 1024/2 "10-bit resolution"
CCP1CON.4 = Duty1.0 ' Setup 10-bit duty cycle as
CCP1CON.5 = Duty1.1 ' a 10-bit word
CCPR1L = Duty1 >> 2
next DUTY1
you see i declare the DUTY1 = DUTY2 for my dutycycle but it wont work
please help assist.
thanks





Bookmarks