MCU to FTDI / RS232

BobaMosfet

Joined Jul 1, 2009
2,113
Or if one wants to be creative, they could create an SPDT switch using a complimentary MOSFET and a 2N700X to control it. Allows you to literally switch which tranceiver would get TX/RX from the MCU.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
I had another thought, a buffer and a switch would work. I think a few AND gates should do it. Hopefully will have time to work it out this week.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
OK it can be done with 4 PMOS and jumpers... will check part count using Mux and demux chips... not sure yet which is better. I have plenty of room on my board.
 
I can't see why, besides educational purposes or high-power transmission, you should reinvent the wheel, a single '157 is all what is needed: it is a cheap, well known and reliable solution, for low frequencies also the wired-and is fine.
If you want also to demux the output to the rs232/usb ICs (maybe for some reason you don't want a simultaneous output to both the ICs) another cheap and reliable solution is a 74HC4052 or 74HC4053 which are bidirectional switches.
Of course a single 2:1 mux plus a single 1:2 demux like NL7SZ18 are a good option but typically a single IC is cheaper than two.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
I can't see why, besides educational purposes or high-power transmission, you should reinvent the wheel, a single '157 is all what is needed: it is a cheap, well known and reliable solution, for low frequencies also the wired-and is fine.
If you want also to demux the output to the rs232/usb ICs (maybe for some reason you don't want a simultaneous output to both the ICs) another cheap and reliable solution is a 74HC4052 or 74HC4053 which are bidirectional switches.
Of course a single 2:1 mux plus a single 1:2 demux like NL7SZ18 are a good option but typically a single IC is cheaper than two.
I will want demux for the USB and was looking at exactly that combination. There may be other advantages to using transistors due to switching power and indicators. Either way, I’ll think through it before deciding. Yes it’s easier to just slap a couple chips on it. I don’t need bidirectional.
 

Thread Starter

Wolframore

Joined Jan 21, 2019
2,610
I got it to work by using software serial on separate pins, grounding out power for FTDI works fine and there are resistors inline with this pair which reduces the current when power pin is at ground, saves adding more chips and getting perfect RS232 waveforms at about +/-9V. Will be going to final design.
 
Top