Skip to content
Snippets Groups Projects
Select Git revision
  • 4ff440eaac9aee21bd0a6c7f5ce7927ee4cd9b94
  • master default
2 results

aufgabe-2.c

Blame
  • 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;
    }