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

Thread: Teensy 3.0 as USB to serial (simple RS-232) converter

  1. #1
    Junior Member
    Join Date
    Aug 2014
    Posts
    2

    Teensy 3.0 as USB to serial (simple RS-232) converter

    hi all,
    i have some altitude logger (for RC gliders), which can be connected to PC via serial port (downloading logs, configuring device, etc...).
    i don't have serial port on my laptop, so i would like to use my Teensy 3.0 as USB to serial converter.

    i have it confirmed (from altitude logger manufacturer) that it can communicate with the device via "simple" RS-232 (no negative voltage levels needed):
    0 = +3V
    1 = 0V

    so i don't need some additional device like max232, i need only signal inversion. i don't wanna use additional hardware (transistors) for that i would like to do it on software side.

    please give me some tips how to accomplis this, my only goal is to see new COM port in Windows (Teensy, 38400 8N1) and connect altitude logger to Teensy via four wires (Gnd,Vcc,Tx,Rx).

    thanks a lot!

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,657
    If it were me, I would try hooking it up to the Teensy 3.1 to the pins associated to one of the UARTS. I would then try to configure the UART to see if I could make it work. In particular, I would look at: the RXINV flag on UART_S2 field and TXINV field on UART_S3.

    Kurt

  3. #3
    from https://www.pjrc.com/teensy/td_uart.html for use with a RS232 hardware try:

    Code:
    void setup() {
      Serial1.begin(38400, SERIAL_8N1_RXINV_TXINV);
    }
    regards!

    PD: out of curiosity... what hardware you want to control?
    Last edited by flipflop; 08-25-2014 at 07:09 AM. Reason: add PD

  4. #4
    Junior Member
    Join Date
    Aug 2014
    Posts
    2
    Quote Originally Posted by flipflop View Post
    PD: out of curiosity... what hardware you want to control?
    thanks flipflop! i want to read altitude from this device: http://www.jataya.net/en/alam00 (only in Czech language, sorry)

    -Radovan-

  5. #5
    Code:
    Serial1.begin(38400, SERIAL_8N1_RXINV_TXINV);

    Thank You!

Posting Permissions

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