Created
May 14, 2019 10:04
-
-
Save avr-programmierung/85a59e9b504d29332c8f6973b472f454 to your computer and use it in GitHub Desktop.
ATmega88 @ 8MHz 19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* code019.c ATmega88 @ 8MHz */ | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRD = 0xFF; | |
uint8_t i; | |
while(1) | |
{ | |
for (i=1; i<=255; i++) // 255 Durchläufe erzeugen von 1 beginnend | |
{ | |
PORTD = i; // PORTD = aktueller Wert von i | |
_delay_ms(200); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment