I want to run 2 pins input and 4 pins output on port-D of my mega8 AVR chip. Normally, when the port is all output I just assign - like;
portd=0xFF; portd=0x001;
Now if the first two pins are input, and I assign a value to port-d, what effects will it have? Will it just ignore my code and report what the hardware inputs read? Will it tangle with interrupts if I am using them?
Please advise.