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

Thread: How to setup TTL UART Serial

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Posts
    6

    How to setup TTL UART Serial

    I have very simple question on obvious but I am not sure what I am missing to make TTL Serialprint (Serial1.Print) statement functional. Can you please help

    I reference the link @ https://www.pjrc.com/teensy/td_uart.html. The only difference on my end is different TTL converter (picture of connection attached) to use a premade TTL-RS232 conversion. I purchases a FTDI USB-TTL device from here- https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1 . I did a quick check on this UART loopback and it works; tried various baud rate


    What am I missing? I am trying to build Teensy3.6 as a HID sensor device and running into issue. I like to better way to debug the code on all flows to see HID commands coming from OS side ( and not rely on USB serial)


    Here is my pin connection

    Teensy - FTDI
    (Pin0) Rx - Rx
    (Pin1) Tx - Tx
    Gnd - Ground

    Is RX-TX need to be swapped. Not sure I need to connect the Vcc (3.3V) on both side. I did connected both end Vcc (3.3) together earlier). I verified the Vcc is ~3.3V sepeately on both ends (while disconnected) Could it be damaged?

    Below is a simple code snippet.

    Code:
    #define Uart Serial1
    
    void setup()
    {
      Serial.begin(9600); 
      Uart.begin(9600);
    
    }
    
    void loop()
    {
    
      Serial.println("Hello World...");
      Uart.print("Hello serial");
      
    
      delay(1000);  // do not print too fast!
    }
    What am I missing. Any pointer will help. Thanks for sharing info
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Teensy_Serial.jpg 
Views:	8 
Size:	177.3 KB 
ID:	19445  

  2. #2
    Senior Member
    Join Date
    Jan 2015
    Location
    UK
    Posts
    106
    It is not very clear from the photo but have you actually soldered some header pins on to the Teensy then plug it onto the bread board?

    Looks like the RX1 and TX1 on the Teensy is not connected to anything.

    Click image for larger version. 

Name:	How_to_setup_TTL_UART_Serial.jpg 
Views:	7 
Size:	72.3 KB 
ID:	19446

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,320
    Yes - It looks like you are trying to use friction between IO pins and breadboard, which usually does not work.

  4. #4
    Junior Member
    Join Date
    Feb 2020
    Posts
    6
    That was very dumb on me... somehow I though connection might be OK. Thanks again! Yes it works now!

    Much appreciated specially a prompt reply

Posting Permissions

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