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

hello-1.c

Blame
  • Forked from Peter Gerwinski / bs
    Source project has a limited visibility.
    blink-01.c 681 B
    #include <avr/io.h>
    
    #define F_CPU 16000000
    #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 (250);
          PORTB = 0x00     /* Hexadezimalzahl. Binär: 0000 0000 */;
          _delay_ms (250);
          PORTB = 0x20;    /* Hexadezimalzahl. Binär: 0010 0000 */
        }                  /* Bits zählen:              ^   ^ ^------ Bit 0 */
      return 0;            /* rechts anfangen           |   `-------- Bit 2 */
    }                      /* mit 0 anfangen            `------------ Bit 5 */