> So, I can tell the CCP to set or clear a pin on a match. Let's say I tell > it to set the pin on the match. How do I clear the pin? bcf LATx,CCP_Pin_No I take it you're wondering about creating a pulse of a precisely planned length without fiddle-farting around with a busy loop? Start Timer1, setup the CCP module to go high on match, put the appropriate value for the pulse length of interest into CCPRx, clear TMR1L, clear TMR1H, clear the CCPx LAT bit. Once Timer1 is running and the CCP module is set to go high on match, all you need to do is clear the TMR1 registers and the appropriate LAT bit. Could be a problem if you are using Timer1 as a timebase for something else, though, but you could use Timer1's starting value as a basis for calculating an appropriate value for the CCPR registers, on the fly. No need to reset Timer1, then. Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist