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

Thread: Simplex UART on Teensy 4. RX or TX only

  1. #1
    Junior Member
    Join Date
    Sep 2021
    Posts
    2

    Simplex UART on Teensy 4. RX or TX only

    Is it possible to configure a UART as simplex and use only the TX or RX pin, and use the other pin for something else ?

    Remco

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,206
    Yes. The pins each have a 8 channel mux which allows 1 of 8 things to control the pin.

    While there are many ways you might do this, the simplest would be to use Serial1.begin(baud), which causes both RX1 & TX1 to be controlled by the Serial1 hardware. Then later use pinMode() on either of the pins, which will reconfigure the mux for GPIO to control that pin. The serial port will continue functioning, even though from it's perspective one of the pins is no longer connected.

  3. #3
    Junior Member
    Join Date
    Sep 2021
    Posts
    2
    Lovely simple solution! thanks!

Posting Permissions

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