Just an expample to simulate the conversion from TTL (in fact, open colector) to RS232.
The open colector isisimulated by the switches on the left side.
The TTL command is simulated by the commuter on the right down side, provided minimum RS232 voltage levels.