Hi all, I am trying to use the compare part of the CAPCOM on a 16F876 to clear the output when the timer count equals the compare value, It works fine to set the pin when the count is correct, but when changed to clear the pin when the count is correct it is clearing the pin straight away. I am disabling the CAPCOM and manually setting the pin, clearing CCP1IF and then enabling the CAPCOM with a value of 0x09 for compare, clear on equal. Any ideas anybody? Regards Martin