Pages: [1]   Go Down
Author Topic: Leonardo and serial communication cable  (Read 690 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, (new to arduinos)

I am trying to exchange data via serial port between PC and arduino Leonardo. I know already that i must use Serial1 and not Serial because Serial is allocated for micro programming.

"The Arduino Leonardo board uses Serial1 to communicate via TTL (5V) serial on pins 0 (RX) and 1 (TX). "

The question is: should I use the same usb cable to use the Serial1 or do I need to connect another cable 
to use Serial1. which cable? db9? USB? USBtoSerial?    If I need to use another cable, could you please tell me the connections I have to setup.

Thanks a lot

Alex
Logged

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am trying to exchange data via serial port between PC and arduino Leonardo. I know already that i must use Serial1 and not Serial because Serial is allocated for micro programming.

Try loading the 04.Communications "ASCIITable" sketch to the Leonardo and open the Serial Monitor at 9600.  Go back to the IDE and note that you are on Serial and not Serial1.

If you connect something TTL to D0/D1, you will need to use the Serial1 in your sketch.  You PC to Leonardo will be through Serial.
Logged


Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure you understand the difference between Serial and Serial1.

not Serial because Serial is allocated for micro programming.
"Serial" is for the USB to serial "device".  This is used for programming or communicating with the PC.  If you wish to transfer data from the PC to the Leonardo without any additional hardware, you are going to be using "Serial".

"Serial1" is for communicating with another TTL serial device connected to Pins 0 and 1.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Pages: [1]   Go Up
Jump to: