Interrupt Service Routines; A) Overview - Motorola 68HC12 User Manual

Table of Contents

Advertisement

5. Interrupt Service Routines Overview:
Overview:
The 68HC12 provides a wide array of interrupts that can be used by the programmer.
Some of these are similar to interrupts found on the 68HC11, such as the RTI and
timer overflow.
converter interrupts.
operate.
Interrupts on the 68HC12 are controlled in part through the D-Bug12 monitor
program.
The SetUserVector routine in the D-Bug12 monitor is used to program the
ISR vector table that tells the processor where the different ISRs are located in
memory.
When using a particular interrupt the ISR must be assigned to the interrupt in the
beginning of the program.
vector table base address, which is stored in the D-Bug12 header file.
assigning the interrupt, SetUserVector is called and the name of the interrupt as
well as the ISR name are passed as parameters.
ISR in the vector table.
For example: If you are using the Real Time Interrupt (RTI) and have it call an ISR
called RTIInt when it is triggered, the code would look like:
DB12->SetUserVector(RTI, RTIInt);
The list below is all of the interrupts and their mnemonics:
AtoD
PAEdge
PAOvf
TimerOvf
Timer7
Timer6
Timer5
Timer4
Timer3
Timer2
Timer1
Timer0
RTI
IRQ
XIRQ
The format of the ISR is show below.
_ _mod2_ _ void RTIInt()
{
// your code here
}
It also must include a function prototype of the format:
_ _mod2_ _ void RTIInt();
Note: There are 2 underscores both before and after the mod2.
Others are new to the 68HC12 such as the key wakeups and A/D
This section will cover all the different ISRs and how they
Each interrupt has an address offset to the interrupt
A to D converter interrupt
Pulse Accumulator Edge triggered
Pulse Accumulator Overflow triggered
Timer Overflow
Timer 7
Timer 6
Timer 5
Timer 4
Timer 3
Timer 2
Timer 1
Timer 0
Real Time Interrupt
IRQ interrupt
XIRQ interrupt
This will store the address of the
All ISRs follow this format.
16
When

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents