Created
May 14, 2019 10:06
-
-
Save avr-programmierung/ef4b16fef1806e3a4694bcfbfca9913f to your computer and use it in GitHub Desktop.
ATmega88 @ 8MHz 20
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
/* code020.c ATmega88 @ 8MHz */ | |
#include <avr/io.h> | |
uint16_t i, j; // Zählvariablen (i und j) vom Typ Int 16-bit Wertebereich 0...65535 | |
int main(void) | |
{ | |
DDRD = (1<<PD0); // Richtungsregister Portpin D0 auf Ausgang | |
while(1) | |
{ | |
for (i=1; i<=500; i++) // äussere Zählschleife | |
{ | |
for (j=1; j<=1000; j++) // innere Zählschleife | |
{ | |
} | |
} | |
PORTD ^= (1<<PD0); // Toggle Portpin D0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment