Hello,
The problem with my Arduino Uno (actually a freetronics eleven AtMega328P) is that inputs on port D are always reading 0. I think this is a permanent disfunction of the board. It occurs when using the Arduino digitalRead() functions as well as when using the avrsh tool to drive the pins. Reads from the higher pins, which are routed to a different port still function.
The problem arose when I was attempting to read the state of two switches connected to digital pins 2 and 3 (PD2 and PD3 I think). The pins were in INPUT_PULLUP mode. They were connected to one pole of there individual switches, the other poles were connected to the ground of the board. There were no external pull up resistors. The board was powered by USB off the host PC.
This arrangement worked for a while - the Arduino appeared to read the digital state of the pins - but now they are broken.
Any thoughts on what has gone wrong?
Should I have used an external pull up resistor rather than relying on the internal one?
Brendan