Page 1 of 1

Soft UART on specific pins

Posted: Thu Apr 02, 2020 8:09 pm
by doceave
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

Challenges:
> 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?

Thanks.

Re: Soft UART on specific pins

Posted: Fri Apr 03, 2020 1:03 am
by jimmo
Hi,

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?

Re: Soft UART on specific pins

Posted: Sat Apr 04, 2020 6:43 pm
by doceave
Got you....

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