Let's Make Robots!

mega 32

atmega32 INT2

Hi...

 

I have an atmega 32... I want to use all of the 3 interrupts... I got problems with INT2...

 

I set it up as a falling edge and via a 10K resistor put the button to ground...

 

while(bit_is_set(PINB, PB2));

_delay_ms(5000);

//init interupt

GICR |= (1<<INT0) | (1<<INT1) | (<<INT2);

sei();

 

 

 

the problem is that after the while... when the interrupts are initialized... the pull-up drops out...