hi im new for programming with JTAG.
i want to learn how to use interrupt in my board LPC2138…
but it always can’t worked.
this is the code :
char pin;
void EXTINTVectoredIRQ(void) {
pin = 13;
EXTINT = 0x00000002;
VICVectAddr = 0x00000000; //clear interrupt
}
int main(void){
PINSEL0 =0x20000000; //set P0.14 as EINT1
VICIntSelect &= ~0x8000; // int 1 interrupt is an IRQ interrupt
VICIntEnable = 0x8000; // Enable int 1 interrupt
VICVectCntl1 = 0x2F; // Use slot 1 for int 1 interrupt
VICVectAddr1 = (unsigned)EXTINTVectoredIRQ;
pin=12;
while(1){
IO0DIR |= 1<<pin;
IO0CLR=1<<pin;
delay(500000);
IO0SET=1<<pin;
delay(500000);
}
}
i used LPC P2138.
this code is always blink the LED in pin 12. when an INT1 is active, the blinking LED is move to pin 13.
that’s any problem with JTAG, or my code?
i tried to give ‘1’ to INT1(P0.14) but nothing happens…
please help me to solve this problem…
thx u so muchh…