I am trying to debug my ATmega324P TQFP INT0 interrupt. I have configured the MCU so INT0 (PD2) is triggered on an incoming logic low event and therefore I have used a pull-up resistor.
The problem I have is the INT0 I/O pin after the first event is pulled low and will not reset high. I have confirmed this by putting a scope on the I/O pin.
I have included my code below, and cross referenced with the datasheet, but I do not think I have made a mistake. Can anybody see any problem, or am I implementing my interrupt incorrectly?
#define F_CPU 8000000UL
Data = 1;
DDRB = (1 << DDRB4); // Set LED as output
PORTB = 0b00000000; // Set LED state to zero
DDRD = (0 << DDRD2); // Set INT0 as input
PORTD = (1 << PORTD2); // Set INT0 pull up resistor
EIMSK |= (1 << INT0); // Enable INT0
EICRA |= (0 << ISC01) | (0 << ISC00 ); // Trigger on logic low
Data = 0;
PORTB ^= PORTB4; // Toggle led state