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

blink-8.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    blink-8.c 374 B
    #include <avr/io.h>
    #include <avr/interrupt.h>
    #include <stdint.h>
    
    ISR (INT0_vect)  /* PD2 */
    {
      PORTD ^= 0x40;
    }
    
    int main (void)
    {
      cli ();
      EICRA = 1 << ISC00 | 1 << ISC01;  /* INT0: steigende Flanke */
      EIMSK = 1 << INT0;  /* INT0 einschalten */
      sei ();
      DDRD = 0xff;   /* binär: 1111 1111 */
      PORTD = 0x40;  /* binär: 0100 0000 */
      while (1);
      return 0;
    }