#include #include #include #include #include #include #include #include static volatile uint8_t switches; static void delay(uint16_t us) { while(us) us--; } int main(void) { DDRB = 0xff; //use all pins on PORT B for output DDRC = 0x00; //use all pins on PORT C for input switches = 0; //init variable representing the LED state while(1) { // read the state of port C switches = PINC; // display on port B PORTB = switches; } }