#define F_CPU 1000000L #include #include int main(void) { DDRB |= _BV(0)|_BV(1); PORTB |= _BV(0); PORTB &= ~_BV(1); DDRD &= ~_BV(0); PORTD |= _BV(0); unsigned char i,n; while (1) { PORTB ^=_BV(0); PORTB ^=_BV(1); n = (PIND & _BV(0))? 100: 20; for (i = 0; i < n; i++) _delay_ms(10); } return 0; }