Academic Program

Interrupt

Interrupt

The NCO output can trigger an internal interrupt when the accumulator overflows. This is handled by three bits (GIE, PEIE, NCOxIE) in the set of registers shown below. This will allow the NCO to control software actions through the interrupt service routine in the application code while also outputting a signal to an I/O pin.

GIE is the Global Interrupt Enable bit.
PEIE is the Peripheral Interrupt Enable bit.
NCOxIE is the NCO Interrupt Enable bit. There can be multiple NCO modules. The "x" represents the NCO number.

The NCOxIF bit is the interrupt indicator flag. This can be monitored in the software to see if an interrupt has occurred. This needs to be cleared in the interrupt service routine or in the software routine that read the bit.

 

NCO_interrupt.png