Hello, I have been scouring the datasheet and searching the forums, but haven't found the answer. Maybe someone can help.
DDRB |= 1<<2; PORTB |= 1<<2;
This just turns on the pull-up resistor, it won't light an LED through a 1k resistor. It's as if the data direction bit setting is ignored.
DDRD |= 1<<6; PORTD |= 1<<6;
works fine for PD6, lights an LED no problem.
I'm guessing an alternate function of this pin is overriding the DDR, but I having trouble finding the answer.