PDA

View Full Version : Discussion TTL to 232 Cable Questions


Xptical
Dec 14, 2007, 08:45 PM
Hi all,

I ran across the following diagram for a simple TTL-to-232 cable. I have some questions.

1. The cable specs a 5v input. Should I draw that from a RX battery pack?

2. The cable shows a drop to ground. Should that be the negative side of the RX battery? Or, should it be the SGND pin (pin 5) on the 232 connector.

3. What the heck are they doing with the DTR pin? DTR goes high when the port is enabled. Are they using it for additional voltage?

4. What about DSR on the 232 side? I know some PC programs can ignore DSR/RTS/CTS. But I usually loop DSR and CTS with DTR just to ensure good communication.

Thanks all.

Xptical
Dec 14, 2007, 08:56 PM
I think I may have answered my own question. I found this page:

http://www.uchobby.com/index.php/2007/06/11/ttl-to-rs232-adaptor-explained/

That goes into sickening detail about the adapter. In any event, GND is the ground pin of the TTL connector and VCC (5v) comes from the TTL connector.

jeffs555
Dec 14, 2007, 11:36 PM
I suspect in the circuit you show there is just an error and ground should go to pin5 on the DB9. Also, you may have problems on some RS232 ports with that circuit because it doesn't drive negative on the transmit data.

The circuit on the link in your second post is better because it has a diode and cap off of the RXD to provide a negative voltage for the TXD. I have used a circuit like that many times with no problems. I always loop RTS-CTS and DSR-DTR. The voltage on the transistors is not critical and anything from 5 to 9 volts should work, but the pullup on the TTL RX should be powered from the same voltage as the logic it is driving.

Brandano
Dec 16, 2007, 03:03 PM
You might also want to look into using a max232 chip. It also includes voltage pump circuitry to raise the voltage to rs232 levels without the eed for an external 12v supply, using very few additional components. I found an example here: http://www.kmitl.ac.th/~kswichit%20/MAX232/MAX232.htm , that also details another chip that does the same job without the need for external components. Might be harder to find though.

dleroi
Dec 17, 2007, 05:59 PM
You might also want to look into using a max232 chip.

Here's a Max232 circuit that's hard to beat:

http://www.downtowninternet.com/beginner/productPage.php?Part_Number=31114

phil_g
Dec 21, 2007, 08:16 AM
If you invert the logic, most RS232 receivers including the almost universal 1489 will receive 5v logic levels without need for line drivers like the MAX232.
All my PIC serial projects feed serial 5v data to a PC serial port directly.
The only change is that Mark is 0v & Space is 5v which is the inverse of how you would feed a MAX232 - just a simple software change. Try it, it does work.

Cheers
Phil