Having some trouble getting this silly thing to go off. Here's my set up code: ----------------- TMR1H = TMR1L = 0; // reset TMR1 TMR1ON = 0; // TMR1 Off T1CON = 0x06; // TMR1 = No sync, external clock TMR1ON = 1; // TMR1 On CCP1CON = 0x0A; // Set CCP1 to compare mode, software interrupt CCP1IF = 0; // clear CCP1 flag CCP1IE = 1; // enable CCP1 interrupt GIE = 1; // enable interrupts ----------------- I have a rotary encoder on RC0 providing the clock input, it puts out a 0-5V signal per pulse and is verified working. I receive a serial packet telling to advance or retard the motor, and how far. I then reset TMR1, set the desired amount of pulses in CCPR1H:L, then enable the motor, as shown in the snippet below. ----------------- case ADV_AIRGAP: // advance the airgap TMR1H = TMR1L = 0; // reset TMR1 CCPR1H = serialPacket[1]; CCPR1L = serialPacket[2]; // set desired pulse count M_DIRECTION = FORWARD; // forward motion M_ENABLE = GO; // enable the airgap motor break; ------------------ But I'm not getting a CCP1IF interrupt, I've tried manually clocking the RC0 input, no luck. Looking at Microchip's Capture App Note doesn't really help me much as it doesn't describe why/what it's doing. I'm worried that since I am running the clock input as asynchronous, I may be missing the compare I want as it clocks at a different rate than the PIC is clocked at. Not sure how to really overcome that though, possibly by simply checking TMR1 constantly til >=, but that seems like a hokey way of doing Compare. Ideas? nick@veys.com / www.veys.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu