#include int main() { DDRD &= ~(1 << PD6); // pinul PD6 va fi input PORTD |= (1 << PD6); // activam rezistenta de pull-up DDRD |= (1 << PD7); // pinul corespunzator led-ului USER este output while (1) { if (!(PIND & (1 << PD6))) // daca bitul corespunzator PD6 este 0 PORTD |= (1 << PD7); // LED ON else PORTD &= ~(1 << PD7); // LED OFF } return 0; }