Offenbar ist das Thema komplexer als ich dachte. Ich habe jetzt einen
sauberen 20ms Reset statt einem Timer. Es muss von diesem Interrupt
kommen, weil es erst einsetzt, wenn ich den Timer-Interrupt aktiviere.
Auch der Compiler maul rum, :
uc ist immernoch der mega128
main.c:113: warning: return type defaults to `int'
main.c:113: warning: function declaration isn't a prototype
main.c: In function `SIGNAL':
main.c:113: warning: type of "__vector_15" defaults to "int"
main.c:121: warning: control reaches end of non-void function
was immer er damit auch sagen will ...
OCR0 = 155; // Timer Reload auf 155
TCCR0 = 0x47; // Autoreload und Prescaler
setbit(TIMSK,OCIE0); // Interrupt enable Timer
sei();
}
SIGNAL(SIG_OUTPUT_COMPARE0)
{
static char sec;
if (++sec % 5 == 0)
{
sec = 0;
if (checkbit(PINC,PC6)) clearbit(PORTC,PC6); else setbit(PORTC,PC6);
}
}
Kann mir jemand verraten, was ich flasch mache
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
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.