Well, I have this embedded system, and only 3.3V level out on serial. Asked for a MAX233 in the shop.. needed to be ordered, was expensive... Told them: Forget it, I will use transistors.
But the second thing, No supply should be used, not even the 3.3V
My solution? I control the terminal (Linux minicom) and the RS232 port too (outb() ). So here it is folks:
Embedded connector
9 pol D connector --------0 > | c TXD 3 -------------------------- 5k6 ------------------------ b NPN | e k | Diode 1N1448 | a | | | GND 5 -------------------------------------------------------------------0 GND | | +12V | DTR 4 ---------------------- | | | | | 5k6 | c | | b ------| | e NPN | | | | | RXD 2 ------------| | | | | | e | b b ------| ----- c e----- 3k3 --------------0 < c | | | PNP c | NPN | b------| | e NPN | | | 3k3 - 12V | | | RTS 7 ------------------------------All NPN transistors BC547, all PNP transistors BC 557.
As you can see the top is classical, but the reverse path uses a common base for level shifter :-) I start minicom, hardware flow control off, and then after that a small program that sets DTR to +12 V and RTs to -12 V, there is my supply :-)
Maxim defeated :-)