#include int main(void) { unsigned char temp; ddrc = 0; ddrb = 0xff; ddrd = 0xff; while(1) { temp = pinc; //read from pinc if (temp < 100) portb = temp; else portd = temp; } return 0; }