Interrupts
The I/O series of microcontrollers each contains a range of both external and internal interrupt
functions. The external interrupts are controlled by the action of one or two external pins, which
are present on all devices. The internal interrupts are controlled by the Timer/Event Counters, and
in the case of the HT48RU80/HT48CU80 devices by an additional UART function. One or two inter
-
nal Interrupt Control registers contain the control bits which manage the enable/disable function of
the individual interrupts and their corresponding interrupt request flags.
Interrupt Registers
With the exception of the HT48RU80/HT48CU80 devices, a single interrupt control register, known
as INTC is provided to control all the interrupt control features. For the HT48RU80/HT48CU80 de
-
vices, two interrupt control registers, known as INTC0 and INTC1, are provided.
Once an interrupt subroutine is serviced, all the other interrupts will be blocked, as the EMI bit will
be cleared automatically. This will prevent any further interrupt nesting from occurring. However, if
other interrupt requests occur during this interval, although the interrupt will not be immediately ser
-
viced, the request flag will still be recorded. If an interrupt requires immediate servicing while the
program is already in another interrupt service routine, the EMI bit should be set after entering the
routine, to allow interrupt nesting. If the stack is full, the interrupt request will not be acknowledged,
even if the related interrupt is enabled, until the Stack Pointer is decremented. If immediate ser
-
vice is desired, the stack must be prevented from becoming full.
All interrupts have the capability of waking up the processor when in the Power Down Mode. As an
interrupt is serviced, a control transfer occurs by pushing the Program Counter onto the stack, fol
-
lowed by a branch to a subroutine at a specified location in the Program Memory. Only the Pro-
gram Counter is pushed onto the stack. If the contents of the accumulator or status register or
other registers are altered by the interrupt service program, which may corrupt the desired control
sequence, then the contents should be saved in advance.
52
I/O Type MCU