Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Teensy 3.5 SerialCom doesn't read

  1. #1
    Junior Member
    Join Date
    Oct 2020
    Posts
    3

    Teensy 3.5 SerialCom doesn't read

    Hi

    I have a Teensy 3.5 and I need its 4 SerialCom Port.

    The problame that I can use RX-TX 1, 2 and 3 but it doesn't communicate throught the 4 and 5 (pin 31-32, 34-33) Ports.

    What could be the problem?

    THX

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,752
    Those ports have full function when properly wired GND and proper RX<>TX association to a 3.3v UART device - as long as nothing else in software touches those pins beyond Serial4.begin() of Serial5.begin()

    Write a simple sample of some sort crossing Serial 4 or 5 pins to itself or to each other to check function - that was done in Beta to confirm full function.

    Without code or images to see the usage or soldering to help ...

    Perhaps confirm with a pin test on those pins able to switch HI and LOW as outputs and read HI and LOW as inputs.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,084
    Quote Originally Posted by questioner View Post
    What could be the problem?
    It could be wires not connected properly. Or it might be a mistake or misunderstanding in the code. Yeah, I know that's pretty obvious and covers all the bases, could be either hardware or software. But really, what kind of an answer can I possibly give?

    I can confirm Serial4 definitely does work on Teensy 3.5. In fact, I retested it just now using a FTDI TTL level USB-serial cable. It it is wired up on my workbench.

    Click image for larger version. 

Name:	t35.jpg 
Views:	11 
Size:	57.2 KB 
ID:	22061

    I ran a trivial program which just prints each byte received from Serial4 to the USB port, and vice versa. Here you can see it working when I typed "test" into the serial monitor and "hellow" into the seyon terminal emulator window (for the FTDI cable).

    Click image for larger version. 

Name:	sc.jpg 
Views:	11 
Size:	52.9 KB 
ID:	22062

  4. #4
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    The connections are perfect.
    In code, I tried Serial 1, 2, 3 and these work, so the code is ok but I tested with a simple software and they can't send datas.

    So, if I connect the 31 to 33 and 32 to 34, they don't talk. (It doesn't write out C character.)
    Click image for larger version. 

Name:	Képkivágás.PNG 
Views:	9 
Size:	18.7 KB 
ID:	22064

    BUT if I connect 0 to 10 and 1 to 9, they CAN talk. (It succesfully write out C character.)
    Click image for larger version. 

Name:	Képkivágás.PNG 
Views:	8 
Size:	18.3 KB 
ID:	22065

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,084
    Ah, now we can see a detail you didn't mention earlier. You're using SoftwareSerial. On Teensy 3.5, looks like SoftwareSerial only "knows" the pin numbers for Serial1 to Serial3.

    To use Serial4 and Serial5, you need to use the actual serial names, not SoftwareSerial.

  6. #6
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    Oh sorry, I didn't believe that it is important.
    I am going to try it.

    Thanks for the fast help.

    EDIT:
    Yes, it's work.
    Last edited by questioner; 10-13-2020 at 10:23 AM.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,084
    I've updated SoftwareSerial, so future versions of Teensyduino will "know" how to use the Serial4-Serial6 pins on Teensy 3.5 & 3.6, and also Serial8 on Teensy 4.1.

    https://github.com/PaulStoffregen/So...d1f2390e2a7359

    Of course it's always slightly more efficient to just use the hardware serial ports directly. This SoftwareSerial support for use of the underlying hardware serial is mostly meant for projects & library already hard-coded to require SoftwareSerial.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •