Schema – RS232 to UART conversion
Sometimes when you work on low budget projects of don’t want to go shopping for max232 or similar IC you can save your time and money by using other TTL to RS232 converter. We usually used to use MAX232 chip like this:
Max232 IC is a specialized circuit which makes standard voltages as required by RS232 standards. This IC provides best noise rejection and very reliable against discharges and short circuits. If your project is more advanced and has to reliable you must use specialized RS232 to TTL converter IC’s. As I said Specialized are more expensive than other solutions.
One of such solution is Transistor based interface:
Transistors can be any general purpose transistors. This circuit is very easy and works without problems. It is cheapest solution as it require couple of transistors and four resistors. Two transistors does a trick to get a negative voltage as required by some PCs. When the PC does not transmit data, its TX pin is stuck to a negative voltage. The negative voltage is picked up from the TX pin and brought back – through resistor R3 – to the PC’s RD pin.
RS232 alternatively can be interfaced using Logic gates. This is handy when your application is using logic elements and there are couple gates left on some IC. As almost every PC can vork with positive-only signals logic gates can provide necessary inversions. For instance using CD4066B CMOS IC:
And of course NAND and NOR circuits:
And don’t forget to Power the logic IC’s with 5V.