Arduino NANO - Analog pins not working as digital pins?

Hi,

Im trying to connect a LCD display to my nano. Only pins available for the RS pin and Enable pin are analog pins 4 and 5. I was under the impression that those would work fine as general I/O pins as well, but even though I have added a potentiometer to the VO pin on the LCD and adjusts it, all I see on my display is a very faint shape of the squares on the upper line.

The LCD works fine though.. when I re-power it, the uppe line squares are clearly visible. Only after initialization of the Arduino do they faint - and I can't see any text in some vague form either.

And I have tested the program thoroughly.... anyone have experience with this?

Analog pins 0-5 work fine as digital I/O pins as long as you are not also using them for I2C/TWI (Wire library).

Some Arduino's have the surface-mount version of the ATmega328P which has two additional analog input pins (6 and 7). Those are ONLY for analog input and can't be used for digital I/O. They are only connected to the input multiplexer of the A/D converter.