>-----Original Message----- >From: Peter McNulty [mailto:petermcnulty@HOTMAIL.COM] >Sent: 10 May 2004 14:03 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] CCP Module Problems - Interrupt > > >Hi, > >Off = 0, I have got GIE as 0, so i just set it to 1, and it's >not working still. Yes, this is the first interrupt code i've >ever written. GIE is the Global Interrupt Enable. This stops the PIC responding to all interrupt sources. PEIE is the Peripheral Interrupt Enable. It enables interrupts for most of the more advanced peripherals including the CCP module. Finaly you have the interrupt enable bit for the peripheral itself, in this case CCP1IE. So in order for the PIC to respond to CPP interrupts, you must have the following set: GIE = 1 PEIE = 1 CCP1IE = 1 Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu