Dan Moos wrote:
I know what the initials stand for, but exactly what is the difference between a DTE and DCE anyway? My part is for a DTE it would seem. Any possibility I should have gotten the female (DCE) part instead?
DTE means
Data
Terminal
Equipment.
DCE means
Data
Communications
Equipment.
A DTE is any device that is the termination of a serial interface link. Examples of a DTE include a character terminal, a printer (serial printers are quite common in warehousing applications), a magnetic stripe reader (aka credit card reader), bar code reader, industrial machine controller, etc. The commonality among these items is they either transmit data out a serial port, receive data from a serial port, or do both. My POC units are DTEs.
When a DTE is connected directly to another DTE the cable that is used to make the connection must be cross-connected: TxD on device number 1 connects to RxD on device number 2, CTS on device number 1 is connected to RTS on device number 2, etc. Device 2's TxD would go to device 1's RxD, etc.
A DCE is any device that is capable of interconnecting one DTE to another DTE. The DCE's distinguishing characteristic is that it can accept the serial interface signals from a DTE, which swing roughly from -12 volts to + 12 volts, and convert them to a different format for transmission over a distance that is not practical with a hard-wired link. The most common type of DCE is a modem, which converts the serial interface signals to a train of audio pulses and vice versa. The cable I described above is a "null modem," which is technically a DCE, although it is passive.
The reason for the voltage swings of the serial interface is to make it reasonably robust in the face of locally generated electrical noise. This is an especially needed characteristic in a factory setting, where all kinds of electrical garbage gets into data lines from big motors, HID lighting, power factor issues, etc. TIA-232 is unbalanced to ground, so the effects of ground plane potential imbalance (GPPI) can corrupt the signal if the imbalance is sufficiently severe. I occasionally run into that problem when two machines that are interconnected via TIA-232 are powered from physically separate breaker panels and one of the panels supports a substantially greater load than the other.
The problem of GPPI led to the development of TIA-422 and TIA-485, both of which are balanced-to-ground serial interfaces and are able to operate over long hard-wired links at high data rates. The AppleTalk network used with the older Macs was a version of TIA-422 and served Apple well until Ethernet took over in the latter 1990s (incidentally, one can implement TCP/IP on a TIA-422 or TIA-485 link if so inclined).
All of my clients with machine tools have serial hardware in the machines' control systems, almost always TIA-485. I'm talking about CNC machining centers, centerless grinders, gear hobbers, etc. USB is useless in such applications because it's too complicated and can't be run over any useful distance. The outer limit with USB 2.0 is about 5 meters, which would barely make it from one end of my office to the other. Hard-wired TIA-232 can run 150 to 200 feet using unshielded twisted-pair (UTP) cable, and TIA-485 can be reliably operated at distances up to 4000 feet (~1.2 kilometers) on UTP, 12 times the maximum practical distance of 100Base-T Ethernet. TIA-232 can be run even farther with short-haul modems, over dozens of miles if repeated dry telephone lines are used.
One of the problems I frequently run into with people who work with computers today is they know little to nothing about serial interfaces and non-consumer computer hardware. That is the result of not being exposed to that sort of hardware, especially since the PC industry (specifically, Microsoft) decided things such as Centronics ports and serial interfaces were "too old and obsolete." That thinking, of course, is very myopic, and reflects the fallacy of thinking only in terms of short-term consumer needs. I always have PCI parallel and serial interface cards in my inventory at all times to connect all that "old and obsolete" hardware that continues to used. They don't collect any dust on the shelf.
Speaking of short-haul modems, I had a client in Chicago whose warehouse was two city blocks from the factory itself. They wanted a printer installed in the warehouse on which shipping orders would be printed. We had them lease a dry line from the telephone company, to which we connected a pair of short-haul modems running at 9600 bps. The modem at the warehouse was directly connected to the printer's serial port and the other modem in the factory was connected to their UNIX server's serial interface multiplexer (32 TIA-232 ports). From the server's perspective, the printer appeared to hard-wired, even though the as-the-crow-flies distance was approximately an eighth mile and the linear distance of the dry line was about 6 miles (the central office was slightly less than 3 miles away). This application was practical only because the server had TIA-232 hardware, as did the printer (an Okidata ML395).