Using digital pin 0 and 1 just like any other Digital Pin?

Hello,

I am transferring a breadboard project to the actual installation.

I've removed the female connector on the arduino to solder directly my connections.

By doing this I've accidentally pulled a circuit node out of the socket so now I can't use that digital pin. My connection are pretty maxed out but I will not use the RX TX Digital 0 and 1.

Could I use these two digital pin for a Liquid Display on Pin DB07 & DB06?

Thank you
Regards

(deleted)

You would be able to use pin 1 as a GPIO pin, however you cannot use pin 0 as a GPIO, this is because the arguing has TX/RX pins that are used to program the Arduino and connect to some external modules.

RX is the receiver part of this communication system, it can then output normally if you are not using any external modules. TX is always transmitting so it cannot be used just like any other pin.

This is why they say the UNO is said to have 13 GPIO pins even though the there are 14 digital pins

EdsArduino:
You would be able to use pin 1 as a GPIO pin, however you cannot use pin 0 as a GPIO, this is because the arguing has TX/RX pins that are used to program the Arduino and connect to some external modules.

RX is the receiver part of this communication system, it can then output normally if you are not using any external modules. TX is always transmitting so it cannot be used just like any other pin.

This is why they say the UNO is said to have 13 GPIO pins even though the there are 14 digital pins

This makes absolutely no sense.

You can use pins 0 and 1 as normal GPIO pins (input, input_pullup or output), as long as you're not using the hardware UART (i.e. if you don't call Serial.begin(...)).
If you connect pins 0 and 1 to some peripheral that has a low-impedance path to ground or 5v (like a switch, for example, or the output of a digital device), this could possibly short out the TX pin of the Arduino during a Serial transmission or during upload.

On a genuine Arduino board, the USB-to-Serial converter has a resistor in series with the TX pin, so you won't damage that pin when connecting something to the RX pin of the Arduino. However, you won't be able to receive anything.

This just means that you have to disconnect whatever is connected to pins 0 and 1 during upload.
During the execution of the program, you can do whatever you want with them.

Pieter

1 Like

Pieter -
Thanks for correcting me, I'm used to using an Arduino Uno that I made so its pretty bare bones and does what I want, my mistake, i can only use d0 as tx. I have just checked with the actual Arduino Uno and you are correct. My bad. Sorry for confusing everyone.

1 Like

Is there a reason why D1/D0 flicker on on reset but all the other digital pins wont ?

I even removed the CH340 with a dremel. Is something setting TX/RX(PD0/PD1?) to HIGH in the arduino core initialization??

thanks

feliam:
Is there a reason why D1/D0 flicker on on reset but all the other digital pins wont ?

I even removed the CH340 with a dremel. Is something setting TX/RX(PD0/PD1?) to HIGH in the arduino core initialization??

thanks

The arduinos TX line will go high (the idle state of a UART) when the bootloader runs. If you program via ISP, the bootloader will be erased and this won't happen.

As an aside, this is one reason why the pro mini is so nice for incorporating into projects.

If you are struggling to get Pin 0 (RX) to work as input, try using a 1kΩ pull-down resistor. I was using a 10kΩ at first, but I guess it was too high. 1k works perfect

Well, the RX pin is pulled up (through the aforementioned resistor) by the TX pin of the USB-serial adapter (except when the USB-serial adapter sends data to it, ofc) that resistor is like 1k or 2.2k iirc. One can usually find some function for which that's okay - if it's an output that's fine (as long as you don't mind it being HIGH briefly on startup), if it's a button wired the normal way (pulled up to 5v, pressing button grounds it) that's fine as long as you don't send anything via serial, and so on.

You know that you can use the analog pins as digital pins too, right?