![](/uploads/1/2/7/1/127136297/937190106.jpg)
All logos and trademarks arethe property of their respective owners.Kanda supply our AVR programmer range, PIC programmer range, Universal programmers, AVR board, CANUSB and allour other products to electronic engineers worldwide.We have happy customers for our AVR, PIC and Universal Programmer and other electronic toolsin UK and Ireland, Norway, Denmark, Sweden, Finlandand other European countries like Netherlands, Switzerland, Austria, Germany, France,Belgium, Spain and Italy. Outside of Europe,Kanda is strong in USA, Canada, Brazil and other South American countries.We also supply our products further afield in Russia, Australia, Singapore, South Korea, Japan, New Zealand and India.In fact, wherever you are in the world, you can rely on Kanda.
![Example Example](/uploads/1/2/7/1/127136297/435153373.png)
![Uart Uart](/uploads/1/2/7/1/127136297/434762154.jpg)
The interrupt enable bit of the interrupt source must be enabled. For example, if the interrupt source is.
Ok, two things.First, within your interrupt routine, you usually have to clear the IF flag RCIF to enable the interrupt to fire again.That's not the reason the interrupt's not firing at all though.The problem with your code is that you are defining a function as an interrupt - which is fine - that causes the compiler to push things to the stack for you automatically, and pop them off after the routine is over. It also terminates the function with a 'return from interrupt' command instead of a simple 'return' command.What it doesn't do is link the function into the interrupt vector. There is usually only a small amount of space around the interrupt vector area, so it is normal to place a goto at the address of the interrupt vector which calls the name of your interrupt routine.Depending on your compiler there are a number of ways of doing this.
I suggest you read the manual for your compiler about interrupt vectors and the sample code for it. $begingroup$ @Kevin: No, the processor entering the interrupt routine does not clear the interrupt condition on a PIC or any other processor I've ever looked at. It does temporarily disable interrupts, but those get re-enabled at the end of a normal interrupt routine. On a PIC 16, this is done with the RETFIE instruction.
No, you don't want a compiler doing this for you. In some cases it's important to clear the interrupt condition in the right sequence with other interactions with the device. $endgroup$–Jan 5 '12 at 17:16.
![](/uploads/1/2/7/1/127136297/937190106.jpg)