D0(RX), D1(TX) and A0-7 as digital output?

Hi!
Using an Arduino Nano Im having trouble using the D0(RX) and/or D1(TX) as output pins to feed an LCD display (Im using the LiquidCrystal lib). If using any other digital pin it works just fine. I also tried to use an analog pin instead, reading the foundations I understand that should be managable. Doesnt work either. (In my upcoming project Ill be needing all the pins on the board.)

So, I have two questions:

  1. How can I use the D0(RX) and D1(TX) for digital output like the other digital pins? (and yes, I did disconnect the USB and feed the Arduino with an extern power source)
  2. How can I use an analog pin like a digital output pin?

This is my test sketch:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(1, A7, 7, 6, 5, 4);

void setup() {
  pinMode(A7,OUTPUT); // this line makes no difference

  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}

Regards
Mattias

Just found out that I can adress the analog pins like A0=14, A1=15...
But why doesnt it work using A6=20 or A7=21?

This code works:

LiquidCrystal(2,19,7,6,5,4);  // 19 = analog pin A5

This code works not. Why?

LiquidCrystal(2,20,7,6,5,4);  // 20 = analog pin A6
  1. How can I use an analog pin like a digital output pin?

You could read the reference pages.
http://arduino.cc/en/Reference/DigitalRead

Note A6 and A7 are analogue-only inputs to the ADC mux on the Nano and similar devices.

I did read the reference pages, still wasnt clear to me. Found the answers about how to use the analog pins in the forum.
Though, where is it stated that analog pin 6 and 7 are analog only? And how come the rx and tx doesnt work like the others as digital outputs?

Though, where is it stated that analog pin 6 and 7 are analog only?

In the processor's datasheet

how come the rx and tx doesnt work like the others as digital outputs?

Even when you disconnect the USB, the USB to serial chip is still active and still pulling the pins through a 1K seriese resistor. Any I/O on this pin must overcome / drive this as well.

I see. Thank you guys for your help!