How to setup TTL UART Serial

APT

Member
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/B075N82CDL/ref=ppx_yo_dt_b_asin_title_o03_s00?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
 

Attachments

  • Teensy_Serial.jpg
    Teensy_Serial.jpg
    177.3 KB · Views: 115
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.

How_to_setup_TTL_UART_Serial.jpg
 
Yes - It looks like you are trying to use friction between IO pins and breadboard, which usually does not work.
 
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
 
Back
Top