Skip to content

Instantly share code, notes, and snippets.

@detik19
Created February 1, 2019 03:14
Show Gist options
  • Save detik19/8c0837c966d7c1e3ff85f168a4868fc6 to your computer and use it in GitHub Desktop.
Save detik19/8c0837c966d7c1e3ff85f168a4868fc6 to your computer and use it in GitHub Desktop.
Blink led AVR
#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