Created
February 1, 2019 03:14
-
-
Save detik19/8c0837c966d7c1e3ff85f168a4868fc6 to your computer and use it in GitHub Desktop.
Blink led AVR
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
#include <avr/io.h> | |
#include <util/delay.h> | |
#define F_CPU 12000000UL | |
int main(void) | |
{ | |
DDRD=0xFF; | |
while(1) | |
{ | |
PORTD=0xFF; | |
_delay_ms(2000); | |
PORTD=0x00; | |
_delay_ms(2000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment