Hi,
As part of my project, I am using a metal detector, which is configured as an external interrupt in Slot0. when I run the program for the first time, the controller executes the code in the interrupt subroutine instead of the main program even though interrupt is not triggered, I guess it's because of the internal pull-up of EINT0. I have to make the input high and then low to return to the main function. After that interrupt works as it is supposed to (Only executing ISR when interrupt occurs). What can I do about this? Is there a way to disable internal pull up(like in Arduino?) Controller : LPC2148 Keil4
#define BUZZER (1<<18) __irq void isr() { IOSET1 |= BUZZER; delay_ms(1000); IOCLR1 |= BUZZER; EINT = 0X01; VICVectAddr = 0; } int main() { PINSEL1 |= 0X01; PINSEL2 |= 0; IODIR1 |= BUZZER; VICIntSelect = (0 << 14); VICVectcntl0 = 0X2E; VICVectAddr0 = (unsigned)isr; VICIntEnable = (1 << 14); INTWAKE = 0; EXTMODE = 0X01; EXTPOLAR = 0X01; while(1) { /*main codes*/ } }