kavir
Newbie level 2
- Joined
- Jun 28, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- 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.
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.