Day 5 Interrupts
For reasons of efficiency, size, and ultimately cost, in the embedded-control world the smallest applications, which happen to be implemented in the highest volumes, most often cannot afford the “luxury” of a multitasking operating system and use the interrupt mechanisms instead to “divide their attention” among the many tasks at hand. Interrupts provide a very strong mechanism for real-time control, allowing our applications to deal with asynchronous external events. Unfortunately, the C programming language does not incorporate the concept of interrupts in its model, leaving the embedded-control programmer with the only choice of defining interrupts as a special kind of function.
Today we will see how the MPLAB