Loading...
Pages: [1]   Go Down
Author Topic: Using Arduino Uno TX and RX pins  (Read 2702 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am needing help regarding using the Arduino Uno Tx and Rx pins. I am trying to use the serial connection pins on the board without using the USB port on the board. Instead, I would like to use the MiniUSB/Serial adapter that the website offers. Is this possible? Do I connect the Tx pin on the Uno to the Tx pin on the adapter and the Rx pin on the Uno to the Rx pin on the adapter or vice versa? Are there any additional lines of code I need to add to use these pins instead of the USB port?

Thanks.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 249
Posts: 16544
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure, you can do that.
The FTDI Basic is what you are referring to?
Connect its Tx to the Uno Rx,  Rx to Tx, Gnd to Gnd, CTS to Gnd, +5 to +5, and DTR to  Reset:
FTDI    UNO
Tx       Rx
Rx       Tx
DTR     Reset
+5       +5
GND    GND
CTS     GND

In void setup(), add:
Serial.begin(speed, such as 9600);  // library takes care of defining D0, D1 for you. Data format used is 1 start bit, 8 bits, no parity, 1 stop bit (8N1)

In void loop(), use commands such as

if (Serial.available() >0){ //take action when a byte is received
 incomingByte = Serial.read(); // read the byte
}
and
Serial.print (your_outgoing_byte);  // your data will go out as a Serial monitor displayable character
or
Serial.println (your_outgoing_byte); // your data with a "carriage return"
or
Serial.write (your_outgoing_byte);  // your data goes out as-is, may not be a displayable character in the Serial monitor.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What does DTR and CTS do and why connect them to Reset and Ground. Also, do I need to supply the adapter a supply voltage or can it use the voltage supplied by the USB?


Thanks.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 277
Posts: 25522
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What does DTR and CTS do
These are called hand shaking lines and they give information about the serial link.
CTS - Clear To Send it tells the sending bit that it has something to send to.
DTR - Data terminal ready is used on the arduino to reset the processor.

Quote
do I need to supply the adapter a supply voltage
Yes

Quote
can it use the voltage supplied by the USB?
Yes
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have tried as you suggested and I get this orange message at the bottom:

Avrdude: stk500_getsync(): not in sync: resp= 0x00.

The program says it has uploaded to the board but the changes made to the code are not working so I do not think it actually uploaded.

Any suggestions?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also when holding shift and then trying to upload I get the error

Avrdude: usbdev_open(): did not find any USB device "USB"

Thanks
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the RX and TX pins on the Arduino Uno and moving the USB connection to a different location away from the microcontroller instead of the plugging the USB directly into the microcontroller. I have the the serial to USB adapter from Arduino and have hooked it up this way:

FTDI    UNO
Tx       Rx
Rx       Tx
DTR     Reset
+5       +5
GND    GND
CTS     GND

I get this message when I try to upload:

Avrdude: stk500_getsync(): not in sync: resp= 0x00.

and I get this message when I hold shift and try to upload:

Avrdude: usbdev_open(): did not find any USB device "USB"

Either way the program says "Done Uploading" but the new program has not actually been uploaded to the board. Any help on how to resolve the issue?

You can see a more in detail description in this post:

http://arduino.cc/forum/index.php/topic,100028.0.html

Thanks
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 316
Posts: 35522
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How is this a programming issue?
Logged

Global Moderator
Melbourne, Australia
Offline Offline
Shannon Member
*****
Karma: 219
Posts: 13896
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Moderator edit: Topics merged.

Don't just start a new thread on the same topic please - it just wastes time as people reference backwards and forwards.
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 277
Posts: 25522
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Avrdude: usbdev_open(): did not find any USB device "USB"
Looks like your computer is not seeing your USB adaptor. Have you got drivers for it?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 249
Posts: 16544
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.ftdichip.com/FTDrivers.htm
for drivers if needed
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Pages: [1]   Go Up
Print
 
Jump to: