3 years, 4 months ago.

emulated uart through gpio pins


since i have all rs232 pins already occupied i wanted to emulate rs232 through gpio. Is there any mbed library i can use for it that works with Nucleo-F401RE


1 Answer

3 years, 4 months ago.

Hi Anteo,

Thanks for the question :)

Have you looked at possibly expanding UART through use of SPI I2C controllers. MAX3100, SC16IS752

Or perhaps maybe using MUX to control the use of the RS232?


Andrea, team mbed

Accepted Answer

Hi Andrea,

thanks for your reply. What you mention is using extra hw. But i cant add extra hw, i just need to use the gpio pins and i thought maybe mbed has some library simulating rs232 through software using the gpio pins. Is that possible?


posted by anteo c 09 Sep 2016


Look into the technique called 'bit-banging' this is what you describe.

You should be able to find mbed versions of this.

posted by Andrea Corrado 09 Sep 2016

Hi Andrea,

can i also use these libs for this purpose (just mapping two gpio pins to rx and tx would be enough for me) https://developer.mbed.org/users/Sissors/code/SoftSerial/ or https://developer.mbed.org/users/Sissors/code/BufferedSoftSerial/ created from

@Erik Olieman (https://developer.mbed.org/users/Sissors/)

posted by anteo c 13 Sep 2016