Select Git revision
aufgabe-2.c
Forked from
Peter Gerwinski / hp
Source project has a limited visibility.
aufgabe-2.c 272 B
#include <avr/io.h>
#include <avr/interrupt.h>
int counter = 0;
ISR (TIMER0_COMP_vect)
{
PORTA = 1 << ((counter++ >> 6) & 7);
}
int main (void)
{
cli ();
TCCR0 = (1 << CS01) | (1 << CS00);
TIMSK = 1 << OCIE0;
sei ();
DDRA = 0xff;
while (1);
return 0;
}