#ifndef F_CPU #define F_CPU 16000000UL #endif #include #include #include int main(void) { DDRC &= (uint8_t)~(1U << PC2); PORTC |= (1U << PC2); PORTB &= (uint8_t)~(1U << PB0); DDRB |= (1U << PB0); while (1) { if (!(PINC & (1U << PC2))) { PORTB |= (1U << PB0); } else { PORTB &= (uint8_t)~(1U << PB0); } } }