Created
January 19, 2014 18:34
-
-
Save theapi/8508972 to your computer and use it in GitHub Desktop.
The hello world of avr-c
This file contains hidden or 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
| #define F_CPU 16000000L | |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| int | |
| main (void) | |
| { | |
| DDRB |= _BV(DDB0); | |
| while(1) | |
| { | |
| PORTB ^= _BV(PB0); | |
| _delay_ms(500); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment