movie_freak
Member level 5
avr external interrupt
Hi,
I am doing this
catching it with:
In the hardware i am having the sensing connected to the controller through a resistor.
Its an ATmega. The input being sensed is 12V(high) DC or 0V(low) DC
The issue: This pin is so vunerable that even if we touch it with hand, or a tweser it executes the "INT4_vect interrupt.
So how can i stabilize this?
Many Thanks,
Surya
Hi,
I am doing this
Code:
DDRE &= ~(1<<4);
SREG &= ~(1<<7);
/* Initialize external interrupt on PE4 */
EIMSK |= (1<<INT4);
EICRB |= (1<<ISC40); // For any logical change the interrupt triggers
SREG |= (1<<7);
Code:
ISR(INT4_vect)
{
// Here i do anything
}
In the hardware i am having the sensing connected to the controller through a resistor.
Its an ATmega. The input being sensed is 12V(high) DC or 0V(low) DC
The issue: This pin is so vunerable that even if we touch it with hand, or a tweser it executes the "INT4_vect interrupt.
So how can i stabilize this?
Many Thanks,
Surya