[SOLVED] Arduino TX RX Lines always in 5v when in input mode

Hello Everyone!

I'm Seeking some help for my project... What's Happening: From various posts here, I learned that we can use the RX and TX lines of Arduino UNO as I/O ports.

But in order to work, I must disable every single call to Serial.begin, Serial.print, Serial.println, and related methods.

This is the problem: I'm doing it, but I still cannot reach a logic 0 in this port !!

I'm Basically doing a pulldown scheme with RX port (Exactly equal to this one here: http://www.mypetarduino.com/images/pullDownResistor.jpg), but all I can get is about 4.57v (Way above logic 0 of arduino) when the switch is open. My sketch (For test purposes) is the one below:

void setup() {
  digitalWrite(0, LOW);    // sets the LED off
  pinMode(0, INPUT);
}

void loop() {}

Is there anything else I should do?

Thanks !

D0 is not usually used as an input in a project as it is connected to the receiver input.
Use D2 and up and also use D14-19 (A0-A5) on an UNO.

LarryD,

Thx for the fast response.

I'm using a Shield that diminish the number of free ports from Arduino. All I got are 0,1,5 and 10 Digital ports... I also wanted 4 working buttons, so my only option (mantaining Arduino Uno my platform) was to try using D0 and D1.

Isn't there another way to use this two ports?

Are all the analog pins used (A0-A5) ?

LarryD,

Yes. They are driving a LCD in 4bit Mode in my project.

Maybe try:

Pin D0 ------- switch pin ------ other switch pin -------- 100 ohms ------ GND

Wire the button as a connection between the pin and ground. There is no need for a pull up resistor because the USB converter is doing that for you through a 1K resistor.

Hi,

digitalWrite(0, LOW);    // sets the LED off
  pinMode(0, INPUT);

try

pinMode(0, OUTPUT);
 digitalWrite(0, LOW);    // sets the LED off

Delare it as an output before using it as an output

Tom... :slight_smile:

Hi,
What shield are you using that uses all the pins?

Tom..... :slight_smile:

Hi, everyone,

Thanks for your help! Consulting Arduino Uno Schematic Reference ((Here)), I managed to get 0v by grounding the pin, like Grumpy_Mike adviced. For either RX and TX, this solution works!

TomGeorge:
Hi,
What shield are you using that uses all the pins?

Tom..... :slight_smile:

I'm using a MP3 shield from Sparkfun. It occupy most of the pins, leaving some. But in my project several of the remainings were being used by an LCD display, leaving only four Digital ports.

Again, Thanks for the guidance!