Default serial port of Teensy 3.6

Status
Not open for further replies.

MickPF

Member
Hello,

I'd like to use a serial port of the Teensy 3.5 for debugging with my own messages via "Serial.printxx()" calls.
I've connected a serial cable to TX5/RX5, because the pins RX1/TX1 are already reserved/in use for my app.
In the Arduino IDE (1.8.4) I can't select any serial port bcause the port selection in menu "Tools" is gray (unselectable).

Which port is the default?
How can I activate this menu point?
How can I tell to my app to use TX5/RX5?

I can't find any helpful information!

Thanks in advance,
Michael
 
I've connected a serial cable to TX5/RX5, ....
In the Arduino IDE (1.8.4) I can't select any serial port bcause the port selection in menu "Tools" is gray (unselectable).

Perhaps this serial cable doesn't work with your computer? Serial cables should show up as ports, regardless of Teensy or any other Arduino board.

Please try to understand how we don't know anything about this cable. We can't see it, and you didn't mention the make or model or anything else about it.

If fact, from only your message nobody can even tell if you're using Mac, Windows or Linux. The way to troubleshoot serial ports differs quite a bit between these systems...
 
Maybe, I am confused.

If you wish to do debug messages using Serial.print... then this goes to the USB port, not to one of the hardware serial ports such as Serial1 which goes to RX1/TX1 (pins 0, 1 by default).

As mentioned if you wish to use the tX5/RX5 pins, you need to do Serial5.begin... But again this has nothing to do with the Arduino IDE Tools-> Ports menu.

As mentioned if your Teensy does not show up in the Tools->Ports menu, Have you ever programmed this teensy before? If not it may not have USB enabled in current program... As mentioned in other threads, try opening up some simple app like blink, Choose Teensy 3.5 in Tools Board type, Choose USB as Serial (default). Then click the verify button to compile your app (blink), when the program completes the Teensy app should load. Now push the program button on the Teensy and it should program with the blink program and then should create a comm port that shows up in the Tools/Port Menu...

But again I only guessing as not enough info here.

If you really want to get debug messages to a PC (Windows/mac/Linux), using one of the Hardware ports, you will probably need some form of USB to serial converter, where you connect up the correct pins to the Teensy (RX, TX, GND) ...
 
Thanks for your answers.

My question was deliberately formulated in general terms.
I use an USB Serial Converter from Waveshare (PL2303, capable for 3.3V).
I could not imagine that it is so easy only to use the name "Serial5.xxx". As I see it's similar to "Wire2.xxx" for I²C devices.
 
I could not imagine that it is so easy only to use the name "Serial5.xxx".

On the Teensy side, it really is that simple. Just use Serial5 instead of Serial1 or Serial and your communication will happen on the RX5 and TX5 pins.

Of course to get communication working, you need something that works connected to those RX5 & TX5 pins. If your computer isn't recognizing the PL2303-based cable and showing it to you in the ports menu, then no matter what Teensy does on those 2 pins, you won't be able to see it.

My question was deliberately formulated in general terms.

Why would you do this? Do you not want our help? Why make helping you more difficult by withholding relevant info?

We *still* don't even know if you are using Mac, Windows or Linux... so even just writing about the PC side, nobody knows whether to talk of /dev/cu devices & Mac system profiler, or /dev/tty devices and Linux udev rules, or Windows COM ports and using the device manager.

Maybe contact Waveshare for help with getting their USB Serial Converter working?
 
Hello Paul,

(Because my English isn't well, sometimes I use the Google translater)

I tried to send this message as a private message to you, but you've turned off this kind of messages.

Few days ago I started with a Teensy 3.6 for a private project. So I'm absolutly newbie in Arduino and Teensy yet. Many fundamental questions in programming the Teensy board are unanswered to me yet.

it's completely irrelevant, which OS runs on the host computer, if I'd like to know how I can control the pins RX5/TX5. Don't you think so?

I use this serial cable (with PL2303 converter) for some ARM embedded boards (BeagleBoard Black and some more).

I'm a computer scientist and software/hardware developer. I think I can judge which information is useful for answering my question(s) or solving a problem.
But I can also deceive ... Nobody is perfect!

Kind Regards,
Michael
 
it's completely irrelevant, which OS runs on the host computer, if I'd like to know how I can control the pins RX5/TX5. Don't you think so?

Ok, well, here's my best attempt to help you understand how to use Serial5, without any disclosure from you about what you're actually trying (that isn't working).

Here is a known good program which transmits data on TX5 (pin 33)

Code:
void setup() {
  Serial5.begin(9600);
}

void loop() {
  Serial5.println("Hello World");
  delay(500);
}

I tested this just now on a Teensy 3.6 with a FTDI TTL level USB-serial cable. Here's a photo of the test running on my workbench.

DSC_0716_web.jpg

To view the data from the FTDI cable, I ran the "seyon" terminal emulator on Linux (Ubuntu 14.04 64 bit). Here's a screenshot.

sc.png

It's also possible to view the data in the Arduino Serial Monitor. To do this, I had to select the correct port from the Tools > Ports menu. Here's a screenshot:

sc.png

Notice in this picture that /dev/ttyACM0 also appears. It is the USB serial which communicates with "Serial" on Teensy. But since this case is using the FTDI cable, the other /dev/ttyUSB0 port needs to be selected, because that is the port for the cable. You must select the correct port to make this work.

Here's a screenshot when I open the serial monitor.

sc.png

I really do want to help you. But since you refuse to give any info about what you're actually doing, I can not guess what you are doing wrong. I hope these screenshots, the photo and this code helps you to repeat these steps.

As I and others tried to explain, all you need to do is use the usual Arduino Serial functions, but use "Serial5" instead of "Serial" or "Serial1". It really does work very easily.

This page has the complete documentation on all the functions. Hopefully this helps?

https://www.pjrc.com/teensy/td_uart.html

If it still doesn't work for you, perhaps try another computer. Or you could post a message with photos and exact details about what you are actually doing. If something is wrong and you show us what you're actually doing, odds are good we'll be able to see the problem and help you solve it. But this only works if you actually show what you're doing.
 
Hello Paul,

Thanks for your very detailed response (and without any sarcasm), which will certainly help me.
Right now, I need to look into a more important detail to me of this project: WiFi and NTP.
I'd like to synchronize an RTC module (DS3231 connected via I²C) with the network time (an ESP07-S connected via SPI).
I think I will encounter many problems which you get as a beginner with such thinks. But I'll not give up...

Kind Regards,
Michael
 
Hopefully you can see how this sort of reply will not scale up to more complex questions.

If you want help here, you really do need to show (not tell) what you're actually doing. We're pretty good at seeing problems and finding solutions when complete code and details are posted.
 
Status
Not open for further replies.
Back
Top