: : Also don't forget to use ic max232 /st232 to convert rs232 signal from/to ttl voltage
Just to clarify, the MAX232 converst from serial-port-level voltages to TTL-level voltages. You only need this device if you are connecting the serial port directly to TTL devices.
In fact, it's overkill if you're just picking one or two pins to work with. You could do the same with discreet devices. That said, if you are interfacing with TTL devices, the MAX232 device is the most practical way to do it.
: also, don't connect anything directly to your port,you can burn the internals diodes of your com very easily.MAX232 is a good choise for
: that too, or use opto-isolators ics
Well, that's going a bit too far. Don't connect anything? I'd better run up and disconnect my printer and Wyse terminal from my UNIX system... :)
Many devices can obviously be connected to a serial port without a MAX232 or opto-isolators.
I've done tons of control circuits by wiring dierctly to the control pins of the serial port, and controlling the pins with software.
The first thing to do, of course, is to check out the RS232 specs, and see what voltages are present, when current expectations are, etc.