Hallo,
ok, also hier der aktuelle Code
Wenn ich nun INT0 oder INT 1 mit VCC verbinde passiert manchmal gar nix, manchmal kommt Zeichensalat im Terminal an..Code:#define F_CPU 16000000 #include <avr/io.h> #include <avr/interrupt.h> #include <inttypes.h> #include "usart.c" ISR(INT0_vect) { usart_print("INT0\n"); } ISR(INT1_vect) { usart_print("INT1\n"); } int main() { usart_init(); GIMSK |= (1 << INT1) | (1 << INT0); MCUCR |= (1 << ISC11) | (1 << ISC10); MCUCR |= (1 << ISC01) | (1 << ISC00); sei(); usart_print("Warte auf Interrupt\n"); while(1) ; }
Viele Grüße,
Johannes







Zitieren
Lesezeichen