Is there more to your program?
If not, then the FORWARD routine is RETURNing but it wasn't called with a GOSUB.
Also,
By setting CCP1CON after seting to 2 LSB's of the dutycycle, it overwrites those bits and you lose resolution.Code:;------------------------ CCP1CON.4 = DUTY.0 ; here we stat loading the CCPR1 CCP1CON.5 = DUTY.1 ; with the value of DUTY Cycle parameter CCPR1L = DUTY >> 2 ; ;----------------------- CCP1CON = %01001100 ; set CCP1CON to full bridge , high output, Forward
<br>
Bookmarks