kc5tja wrote:
Also, if for some reason you do want to drive a line to ground, please do so through a resistor. If you're tieing CTS to ground directly, which is an output I believe, you could be shorting some circuitry causing malfunction of other parts of the chip. Not having seen a schematic, I'm not sure if this is what you're doing or not, so just throwing this out there as a general tip.
You mean CTS. RTS is an output that is driven to both ground and Vcc. Wiring RTS to ground or (worse yet) to Vcc could be fatal to the device. This is true of all UARTs, not just the 65C51.
As a general note to anyone who is new to UARTs and is contemplating a design, in most cases you would set up something similar to the following if you wanted two UARTs to talk to each other:
Code:
Device #1 Device #2
——————————————————————————————
RxD <——————————— TxD*
TxD ———————————> RxD*
RTS ———————————> CTS
CTS <——————————— RTS
DTR ———————————> DSR
DSR <——————————— DTR
GND <——————————> GND*
——————————————————————————————
The arrows indicate the direction of data flow and the above arrangement is for full hardware handshaking. The DSR <——> DTR connections may not be necessary in many cases.
The absolute minimum working interface is the so-called "3-wire" hookup, which connections are asterisked. Depending on the devices involved, software handshaking might be required with a 3-wire interface. Note that software handshaking can become unreliable above 9600 bps, and is unsuitable for use with raw binary transfers, as
<DC1> and
<DC3> characters in the data stream will be intercepted by the serial driver at the receiving end and will not passed onward to the application.