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.

GPIO interrupts in the LPC1313

Status
Not open for further replies.

kavir

Newbie level 2
Newbie level 2
Joined
Jun 28, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
Hello to all
I'm working with keil
And I'm going to use a GPIO interrupt. And the pin PIO0_1
I wrote this program


#include <LPC13xx.h>

void PIOINT0_IRQHandler(void) {
LPC_GPIO2->DATA=0xaaa;
LPC_GPIO0->IC = (1<<1);
}

int main(void){

LPC_GPIO0->DIR = 0x000;
LPC_GPIO2->DIR = 0xfff;

LPC_GPIO0->IS = 0x0;
LPC_GPIO0->IBE = 0x2;
LPC_GPIO0->IEV = 0x0;
LPC_GPIO0->IE = 0x2;


NVIC_SetPriority(EINT0_IRQn,0);
NVIC_EnableIRQ(EINT0_IRQn);

while(1){
LPC_GPIO2->DATA=0xf0f;
LPC_GPIO2->DATA=0x0f0;
}

}


But it does not work in keil simulator.
Anyone knows the problem?
Thanks.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top