Question:
Arduino Uno ,Can TX and RX Pins be used for digital output?
Ben
2013-09-16 01:32:27 UTC
Hi

I am creating a 4x4x4 LED cube PCB and need 20 digital output pins to achieve this in my design. I have seen on the Arduino Uno information sheet it says it has 14 Digital output pins and 6 analogue pins. I have seen a piece of code which can be used to make the Analogue pins give a digital output.

I am doing a PCB design I plan on using a standalone Atmega328p through hole chip .

However two of the digital pins are TX ans RX pins,

Can these pins be used for a digital output?
If so how can a achieve this? ..is there some extra code.

What is the normal use for this Pins?

Any Help Appreciated

Thanks
Three answers:
DB
2013-09-16 13:54:56 UTC
Those pins would be for RS232 comms. They're probably multiplexed with the digital outputs but I'm not that familiar with arduino - I've done lots of work with PIC microprocessors though which are very similar in nature. In PIC there are some control registers that determine the function of the pins. If the pin out diagram shows a digital output / RX then it's configurable, if it only shows RX/TX it probably isn't. Look at the schematic/ block diagram of the arduino and it will probably show you. If they're connected to a RS232 transceiver then the output of the pins you can connect to will be +/- 15v and not very useful to you.



edit: just had a look at the board and it says they're TTL output so that means they're between 0-5v. They will be configurable somewhere in the setup of the processor
?
2013-09-17 04:16:57 UTC
DB is right.



Just make sure you have the ports correctly mapped so the pins are used for digital I/O instead of RS232.



As for their "normal" use that is entirely down to application. You could with a bit of additional code use them for IIC or RS485 or any other similar communication system You could even use them for a very slow CAN bus.



The whole point of a microcontroller is to make it as flexible as possible. I'd double check the analogue pins as usually microcontrollers will let you use them as either analogue or digital I/O. However this is not always the case.
2014-11-02 01:55:15 UTC
complicated matter. lookup in yahoo. that will help!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...