NewGeek said:
So what do you think would be a good application for interrupts?
Anything which requires them 8)
I don't see the point in adding the complication of interrupts if it can be done easily without them, some things are obviously best done with interrupts, such as a real time clock - which needs to keep going even when the processor is busy doing other things.
Also, if the processor is continually busy, obviously interrupt driven serial or key routines make sense - but often these routines simply set a flag to let the main program know that an interrupt has occured, which I always think rather wastes the idea of interrupts!.
But the majority of PIC programs spend most of their time just wasting time, either in delay routines, or waiting for an event to occur - these are easily coped with by polling rather than interrupts.
An obvious use though is waking a processor from sleep, in that case you have no choice, you must use an interrupt - often 'Interrupt on change on PortB' is used - pressing a button on a remote control for example is an ideal candidate.
Another obvious use is to drive a stepper motor, using regular interrupts from a timer to pulse the stepper.