MVECEN = 0
When the MVECEN Configuration bit is cleared, the address pointed to by IVTBASE is used as the high-priority interrupt vector address. The low-priority interrupt vector address is offset eight instruction words from the address in IVTBASE.
For PIC18 devices, IVTBASE defaults to 000008h, hence the high-priority interrupt vector address will be 000008h and the low-priority interrupt vector address will be 000018h.
MVECEN = 1
Each interrupt has a unique vector number associated with it as defined in the IVT. This vector number is used for calculating the location of the interrupt vector for a particular interrupt source.
Interrupt Vector Address = IVTBASE + (2*Vector Number).
This calculated interrupt vector address value is stored in IVTAD register when an interrupt is received.
User-assigned software priority, when assigned using the IPRx registers, does not affect address calculation and is only used to resolve concurrent interrupts.
| IVT Address Calculation | Interrupt Priority INTCON0 Register, IPEN bit | ||
0 |
1 |
||
| Multivector Enable, MVECEN Configuration bit |
0 |
IVTBASE | High Priority IVTBASE |
| Low Priority IVTBASE + 8 words | |||
1 |
IVTBASE + 2*(Vector Number) | ||