Skip to content

Instantly share code, notes, and snippets.

@avr-programmierung
Created May 14, 2019 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avr-programmierung/85a59e9b504d29332c8f6973b472f454 to your computer and use it in GitHub Desktop.
Save avr-programmierung/85a59e9b504d29332c8f6973b472f454 to your computer and use it in GitHub Desktop.
ATmega88 @ 8MHz 19
/* 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