Thank you very much man, this is a very good reply, yes i missed some parameters like setting ccp1 as input. the pwm thing is generated with simple 4 commands that are : PWM1_Init
PWM1_Set_Duty
PWM1_Start
PWM1_Stop
i did, while () and then youu include your command, a simple thing, just tape it on the help to get it..
-t1con.t1ckps= ? ==> because i didn't calculate the prescalar suitable to my application, so i just mentionned that there is a prescalar bit that must bbbe configured.
-t1=tmr1:l;
t2=tmr1:l +tmr1:h;
T=t2-t1;
this part of the program i don't really understand it, if you can explain to me how to assign the value of the timer at some point, because i just copied it from somewhere but not really understand how it works.
-About the ccp1m<3:0>: i'm right : ) it's the correct config.
i'll edit the code, and share it here, maybee this afternoon.
P.-s: i'm muslim too and i'm from algeria, if you want us to be freind, no matter :p