Soft UART on specific pins

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Posts: 26
Joined: Fri Feb 14, 2020 4:02 pm

Soft UART on specific pins

Post by doceave » Thu Apr 02, 2020 8:09 pm

Hi there all

With the help of this forum I have been able to stumble along almost to the completion of a device which will become useful to great many people. Which each iteration the device protoype has become a bit better. Today, however I need to work around a number of problems which will be addressed with the next PCB design.

The problem:
> To assist with tuning of the prototype a near real time visualization of sensor outputs is needed

Proposed solution:
> As data comes in, and following minimal processing, it is output to a serial port for display by another device

> The only pins I have truly free
- D14
- D36
> The SPI pins are free but I may need those for a faster ADC
- If possible a solution would need to avoid using these
> Can't use wifi/BT
- These radios cause excessive noise at sensor level

I need only send out 128bytes of data per second --- a slow serial connection would suffice.

Is there a currently supported soft UART? If not, is somone able to suggest a stable, easily implemented library?

Or this a problem solved by redesigning the PCB to free up TX2 and RX2?


User avatar
Posts: 1900
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Soft UART on specific pins

Post by jimmo » Fri Apr 03, 2020 1:03 am


Which board/chip are you using? If it's ESP32 then there's a pin multiplexer, so the pins don't matter. On STM32 it's possible you might be able to take advantage of the pin AF to get a UART on the spare pins.

Generally soft UARTs are very difficult to implement and more trouble than they're worth because the timing is difficult to make reliable.

You can do soft SPI or soft I2C on any pins though (on all the major ports), would that work for your purpose?

Posts: 26
Joined: Fri Feb 14, 2020 4:02 pm

Re: Soft UART on specific pins

Post by doceave » Sat Apr 04, 2020 6:43 pm

Got you....

I will move logging to version next in which UART pins will be freed

Post Reply