You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
301 B

#ifndef F_CPU
#define F_CPU 16000000UL // or whatever may be your frequency
#endif
#include <avr/io.h>
//#include <avr/uart.h>
#include <util/delay.h> // for _delay_ms()
int main(void) {
DDRD = 0xff;
while (1) {
PORTD = 0xff;
_delay_ms(100);
PORTD = 0x00;
_delay_ms(100);
}
}