3.2. PIC16 C Interrupts
• C interrupt functions
• Interrupt sources
• External interrupt
Interrupts allow an external event to initiate a control sequence that takes priority over the current MCU activity. Typically, the interrupt service routine (ISR) carries out some operation associated with the port or internal device that requested the interrupt.
Interrupts are frequently used with hardware timers, which provide delays, timed intervals, and measurement. A time delay can be implemented using a simple software counting loop, but this has the disadvantage of tying up the processor while the delay executes. A more efficient technique is to use a hardware timer running independently from the MCU clock. This allows accurate timing to be more easily ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access