Skip to content
Snippets Groups Projects
Select Git revision
  • aacc5be00b37f556b7c44152a31c90a8eb2da5a9
  • 2023ss default protected
  • 2022ss
  • 2021ss
  • 2020ss
  • 2019ss
  • 2018ss
  • 2017ss
  • 2016ss
  • 2015ss
  • 2014ss
11 results

test-6.c

Blame
  • Forked from Peter Gerwinski / bs
    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;
    }