I'm kinda new to C programming, can someone advise here?
I am building a motor-controller project, and using atmeg8.
Using port-d, the first two pins are input and the next 4 are output; so I setup like this:
DDRD=0b00111111;
Now normally on a port, I can just assign data to it; like so:
PORTD=0XFF; PORTD=0X08;
But this time, I am mixing input pins and output pins on the same port. I dont want any conflicts with the input - and dont know how avr chips behave. I dont know if I assign data, it will conflict with inputs - can someone please tell me the best way to assign the data only to pins 3,4,5,6 ? Thanks.