- #define F_CPU 1000000UL /* 1 MHz Internal Oscillator */
- #include <avr/io.h>
- #include <util/delay.h>
- void delay_ms(uint16_t ms) {
- while ( ms )
- {
- _delay_ms(1);
- ms--;
- }
- }
- int main (void)
- {
- DDRC = _BV (PD6);
- while (1)
- {
- PORTD &= ~_BV(PD6);
- delay_ms(1000);
- PORTD |= _BV(PD6);
- delay_ms(1000);
- }
- return 0;
- }