p87c591vfb NXP Semiconductors, p87c591vfb Datasheet - Page 131

no-image

p87c591vfb

Manufacturer Part Number
p87c591vfb
Description
Single-chip 8-bit Microcontroller With Can Controller
Manufacturer
NXP Semiconductors
Datasheet
Philips Semiconductors
21 INTERRUPTS
The 8xC591 has fifteen interrupt sources, each of which
can be assigned one of four priority levels. The five
interrupt sources common to the 80C51 are the external
interrupts (INT0 and INT1), the timer 0 and timer 1
interrupts (lT0 and IT1), and the serial I/O interrupt (RI or
TI). In the 8xC591, the standard serial interrupt is called
SIO0.
The seven Timer T2 interrupts are generated by flags
CTl0-CTI3, CMl0-CMl1, and by the logical OR of flags
T2OV and T2BO. Flags CTl0 to CTI3 are set by input
signals CT0l to CT3I. The inputs INT2 to INT5 can be
regarded as 4 additional external interrupts, if the capture
facility of Timer T2 is not used (details see Timer T2 in
Section 16.1.4.1).
Flags CMl0 to CMl1 are set when a match occurs between
Timer T2 and the compare registers CM0 and CM1. When
an 8-bit or 16-bit overflow occurs, flags T2BO and T2OV
are set, respectively. These eight flags are not cleared by
hardware and must be reset by software to avoid recurring
interrupts.
The ADC interrupt is generated by the ADCl flag in the
ADC control register (ADCON). This flag is set when an
ADC conversion result is ready to be read. ADCl is not
cleared by hardware and must be reset by software to
avoid recurring interrupts. The SIO1 (I
generated by the SI flag in the SI01 control register
(S1CON). This flag is set when S1STA is loaded with a
valid status code.
The ADCl flag may be reset by software. It cannot be set
by software. All other flags that generate interrupts may be
set or cleared by software, and the effect is the same as
setting or resetting the flags by hardware. Thus, interrupts
may be generated by software and pending interrupts can
be cancelled by software.
A CAN interrupt is generated (vector address 006BH)
when one or more bits of CANCON register are set (refer
to CAN Section 12.5.5 Interrupt Register (IR) for details).
2000 Jul 26
Single-chip 8-bit microcontroller with CAN controller
2
C) interrupt is
131
21.1
Each interrupt source can be individually enabled or
disabled by setting or clearing a bit in the interrupt enable
Special Function Registers lENO and lEN1. All interrupt
sources can also be globally enabled or disabled by setting
or clearing bit EA in lENO. The interrupt enable registers
are described in Section 21.2.1 and 21.2.2).
There are 3 SFRs associated with each of the four-level
interrupts. They are the lENx, lPx, and lPxH (see
Section 21.2.3 to 21.2.6). The lPxH (Interrupt Priority
High) register makes the four-level interrupt structure
possible.
The function of the lPxH SFR is simple and when
combined with the lPx SFR determines the priority of each
interrupt. The priority of each interrupt is determined as
shown in the following table:
Table 92 Interrupt Priority Register
The priority scheme for servicing the interrupts is the same
as that for the 80C51, except there are four interrupt levels
rather than two as on the 80C51. An interrupt will be
serviced as long as an interrupt of equal or higher priority
is not already being serviced. If an interrupt of equal or
higher level priority is being serviced, the new interrupt will
wait until it is finished before being serviced. If a lower
priority level interrupt is being serviced, it will be stopped
and the new interrupt serviced. When the new interrupt is
finished, the lower priority level interrupt that was stopped
will be completed.
IPxH.x
0
0
1
1
PRIORITY BITS
Interrupt Enable Registers
IPx.x
0
1
0
1
Level 0 (lowest priority)
Level 1
Level 2
Level 3 (highest priority)
INTERRUPT PRIORITY LEVEL
Preliminary Specification
P8xC591

Related parts for p87c591vfb