I am trying to read PD6 on ATmega128, but somehow it is always read as HIGH. Even if I don't connect anything to the pin PD6, it still is high internally.
I measured the voltage on the pin with multimeter, and it would show LOW, but the code reads high. And I've no idea what's going on. Basically I am trying to detect presence of iPod on one of the pins. When I connect iPod to the board I see the pin going high and when I remove it it would go low, but internally the code always thinks it's high.
I tried to disable the pull up resistor and everything else that I could think of but nothing would work.