Interrupts

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Interrupts

3,806件の閲覧回数
ernestsnaith
Contributor I
I am having difficulties with the interrupt vector table.
 
I have blagged some code (C) and cant work out how the interrupts work. One example is
 
interrupt 38 void CANRECEIVE()
interrupt 56 void PORTP()
 
In datasheet i cant match the 38, where does it come from?
 
datasheet quotes vector adress (+ base) and XGATE channel ID.
 
Please could someone explain the base address and how the numbering works
 
Many thanks
 
 
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

617件の閲覧回数
CrasyCat
Specialist III

Hello

Basically it works in the following way:

interrupt number 0 is the reset vector (located at 0xFFFE in the vector table).

interrupt number 1 is the vector located at address 0xFFFC in the vector table.

and so on.

I hope this helps.

CrasyCat

0 件の賞賛
返信

617件の閲覧回数
CCandido
Contributor V
Hi,
PORT=P0
 
void  __interrupt 56 EInt1_Interrupt(void) {
 
code.....................
 }
//--------------------------------------------
void EInt1_Enable_Disable(uchar ED){
     
      HPRIO = 142;
        PIFP = 1;                             /* Clear flag */
 if(ED)
        PIEP_PIEP0 = 1;                   /* Enable interrupt */
 else
        PIEP_PIEP0 = 0;                    /* Disable interrpt */
}
//--------------------------------------------
Edited by Carlos Candido.
0 件の賞賛
返信