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:
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)
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);
}
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?
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.