Peter McNulty wrote : > I have got GIE as 0, so i just set it to 1, and it's > not working still. Of course it isn't. You have still CCP1IE and PEIE set to "0", right ? You must have been reading pages 73-85 in the data sheet a bit to fast :-) :-) > Yes, this is the first interrupt code i've ever written. That's just fine. :-) In a case like this, I've found it easiest to open the data sheet in Acrobat and run a search on "CCP1". That way, you should find all rellevant parts where the CCP1 are discussed. I can actualy find one part of the data sheet that *is* unclear. On page 119, section 14.3.3 is says : "When the Capture mode is changed, a false capture interrupt may be generated. The user should keep bit CCP1IE (PIE1<2>) clear to avoid false interrupts and should clear the flag bit, CCP1IF, following any such change in Operating mode." Now, from this you could get the impression that CCP1IE should be cleared all the time, and not only *during* the operation that 14.3.3 describes. The last sentence should have read something like this : "The user should keep bit CCP1IE (PIE1<2>) clear *during* a change in Operating mode to avoid false interrupts and should clear the flag bit, CCP1IF, *following* any such change in Operating mode and before re-enabling CCP1IE." That whould have been better, IMHO. Best Reagrds, Jan-Erik. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu