Skip to content
Snippets Groups Projects
Select Git revision
  • 0699333bfe5525e72209e2a1d1fb5ecc83746a86
  • master default protected
  • 2018ws
  • 2017ws
  • 2016ws
5 results

blink-11.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    blink-5.c 364 B
    #include <avr/io.h>
    #include <avr/interrupt.h>
    
    ISR (TIMER0_COMPB_vect)
    {
      PORTD ^= 0x40;
    }
    
    int main (void)
    {
      cli ();
      TCCR0B = (1 << CS01) | (1 << CS00);  /* Takt durch 64 dividieren */
      TIMSK0 = 1 << OCIE0B;  /* Interrupt einschalten */
      sei ();
      DDRD = 0xfd;   /* binär: 1111 1101 */
      PORTD = 0x40;  /* binär: 0100 0000 */
      while (1);
      return 0;
    }