#include #include //C is incomplete; there's no port A //B and D are 8 bit ports //AtoD is on port C int main(){ int lsb; int b; long k; DDRD=0xff; DDRB=0x00; for (k=0;k<900000;k++); while (1){ lsb = (PINB<<7); if (lsb==0) b=0xaa; if (lsb==128) b=0x00; PORTD=b; for (k=0;k<5000;k++); PORTD=~b; for (k=0;k<5000;k++); } }