Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with interrupt subroutine

Status
Not open for further replies.

P.DIVYA VANI

Newbie level 1
Newbie level 1
Joined
Jul 5, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
11
sir iam using ARMLPC2148 development board.i wrote the programme using external interrupt 0(p0.16). iam developing a programme it is compiling without any errors.but in debug session the cursor is not going to interrupt subroutine.i cannot find out where I done the mistake.plz help me.
my programme is


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <LPC214X.H>
#include <stdio.h>
 
void init_Eint1(void);
__irq void IRQ_Handler(void);
int main(void)
{
    PINSEL0=0X00000000;
    IODIR0=0X00000001;
init_Eint1();
        
}
 
__irq void IRQ_Handler(void)    //irq subroutine
{
    
    EXTINT=0X00000001;      //initialize the EINT0
    if(EXTINT==0)
    {
        IOSET0=0X00000001;
    }
    else
    {
        IOCLR0=0X00000001;
    }
    VICVectAddr=0x00000000;
}
 
void init_Eint1(void)
{
    
    EXTINT=0X00000001;
    PINSEL1=0X00000001;     
    IOCLR0=0X00000001;
    EXTMODE=0X00000010;     //edge sensitive mode
    EXTPOLAR=0X0000000;     //falling edge
    VICIntEnable=0x00004000;
    VICVectAddr0=(unsigned long) IRQ_Handler;
    VICVectCntl0=0x0000002E;
}

 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top