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

arrays-06.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    blink-02.c 505 B
    #include <avr/io.h>
    
    #define F_CPU 8000000
    #include <util/delay.h>
    
    int main (void)
    {
      DDRB = 0xff;   // alle 8 Ausgänge als Outputs verwenden ("pinMode" für alle 8)
      PORTB = 0x20;  // Bit Nr. 5 auf 1 setzen, alle anderen auf 0 ("digitalWrite" für alle 8)
      while (1)
        {
          _delay_ms (500);
          PORTB = 0x10;       // LED an Ausgang 12 an (Bit Nr. 4), alle anderen aus
          _delay_ms (500);
          PORTB = 0x20;       // LED an Ausgang 13 an (Bit Nr. 5), alle anderen aus
        }
      return 0;
    }