Skip to content

Instantly share code, notes, and snippets.

@alfreedom
Last active January 1, 2016 09:59
Show Gist options
  • Save alfreedom/8128681 to your computer and use it in GitHub Desktop.
Save alfreedom/8128681 to your computer and use it in GitHub Desktop.
primer ejemplo de leds parpadeantes
/* Copyrigth© 2013 Licencia GPL **
** Alfredo Orozco **/
#define F_CPU 8000000L
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRB = 0xFF;
PORTB = 0;
while(1)
{
PORTB = 0xFF;
_delay_ms(500);
PORTB = 0;
_delay_ms(500);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment