Forum: Compiler & IDEs Wie Interrupt Entprellen


von Tommy (Gast)


Lesenswert?

Hallo,

anbei mein Code in dem ich gerne den Taster zu Int1 entprellen würde da
er öfters beim Wake UP prellt, es mir aber leider nicht geling hoffe auf
Hilfe vielen dank!

AtMega16
AvrGCC

INTERRUPT(SIG_INTERRUPT1){
}

void ende(void)
{
lcd_gotoxy(0,0);
lcd_puts("Corsa B 2.0L 16V\n");
lcd_puts("   Bis Bald!!   \n");
cli();
GICR |= _BV(INT1);
MCUCR &= ~(_BV(ISC11) | _BV(ISC10));
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sei();
sleep_mode();
}

von Volkmar (Gast)


Lesenswert?

Schau mal in die Codesammlung. ZB hier:
http://www.mikrocontroller.net/forum/read-4-20549.html

Volkmar

PS: Habe es selbst nicht getestet, hatte nur im Kopf, daß ich sowas
dort schon mal gesehen hatte.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.