Created
November 30, 2012 16:41
-
-
Save rafalw/4176869 to your computer and use it in GitHub Desktop.
Test ATmega48 - avr-gcc (+Eclipse)
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
/* | |
* main.c | |
* | |
* Created on: 2012-11-29 | |
* Author: Rafał Wileczek | |
*/ | |
#include <avr/io.h> | |
#include <util/delay.h> | |
/* | |
* Zapalanie trzech diod LED na przemian | |
* - test avr-gcc i dodatku do Eclipse. | |
*/ | |
int main(void) | |
{ | |
DDRC = 0x3F; | |
while(1) | |
{ | |
PORTC = 1; | |
_delay_ms(1000); | |
PORTC = 2; | |
_delay_ms(1000); | |
PORTC = 4; | |
_delay_ms(1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment