Skip to content
Snippets Groups Projects
Select Git revision
  • 6553afd45fe161a774b935622612df98c41ddf85
  • 2025ss default
  • 2024ss
  • 2023ss
  • 2022ss
  • 2021ss
  • 2020ss
  • 2019ss
  • 2018ss
9 results

arrays-and-pointers-02.c

Blame
  • blink-7.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 = 0xfb;   /* binär: 1111 1011 */
      PORTD = 0x60;  /* binär: 0110 0000 */
      while (1);
      return 0;
    }