- Views: 1
- Report Article
- Articles
- Business & Careers
- Networking
Serial Port in an Embedded System - Types And Uses
Posted: Dec 24, 2021
Serial ports are an important part of many embedded systems. However, it is hard to find them on desktop PCs and laptops because of replacements. The most common type of serial cable, straight-through serial cable, is useful to connect a Data Terminal Equipment (DTE) device to a Data Communications Equipment (DCE) device (for example, a modem).
Let us know more of its type:
Types of Serial CablesData communication among digital devices is performed by serial cables, which are useful to transfer data between devices that use serial port communication techniques. Most of its types use RS-232 (Recommended Standard-232) standard interface to communicate that mainly specifies that data should be sent in a predefined sequence of bits.
Also, there are some special modifications in serial cables like male and female combinations, for example, DB9 serial cables can come in DB9 F/F and DB9 M/M, DB9 M/F, or DB9 F/M. Here DB9 serial cables categorization is shown where F means female and M means male. Usually, the category of serial cables is according to their standards and interfaces.
Basic DTE-DCEThis common serial cable is useful between a DTE and DCE which is data communications equipment and data terminal equipment respectively. In communications terminology, DTE refers to the terminating or initiating point of a session and DCE refers to the forwarding point of a communication session. And these cables offer 9-25 and 25-25 pin connections at transmit-receive end connectors. DCE-DTE cables are normally useful to establish a connection between modem cards and computers. In this scenario, the computer acts as a modem card, and DTE functions as DCE.
Null-Modem CableNull-modem is the ideal standard cable for connecting two PCs using null-modem configuration. It is known as null-modem because it involves no DCE (modem) between DTE-DTE sessions. This process uses a specific signal quantity to make sure that the connection is stable between two devices, which is known as "handshaking."
A null-modem medium is also configured by a serial cable connected to a null-modem adapter, that is having to transmit and receive lines cross-linked. Most common null-modem cables contain 9-9, 9-25, and 25-25 pin configurations at their connectors.
Two-Wire DTE-DCEThis cable is identical to a basic DTE-DCE cable, except that no handshaking process gets involved between computer and modem. You can also get this cable on 9-25 and 25-25 pin configurators which are similar to basic DCE-DTE. Then a limitation of a non-handshaking procedure is only the absence of acknowledgement of DTE end.
V.35 CrossoverThe V.35 crossover interface is useful to connect DTE-DTE and DCE-DCE nodes. It also provides you with an enhanced data rate as high as 64 kbps, by providing 34-34 pin configurations at both transmitter and receiver ends. This particular medium is a mixture of RS-232 and RS-449 standards. Its successors in RS-232 and RS-449 standard domains include V.28 and V.11 respectively.
Serial PrinterSerial printer cables are useful to establish a connection between a computer and printer through a serial port. This cable is configuration-specific; that is, a 9-25 pin cable is used when both printer and computer act as DTE and a 25-25 pin cable is used when computer and printer act as DTE and DCE, respectively. When both devices are DTE, a null-modem cable can work; however, if a serial printer connects to a computer through it, it is ineffective.
Uses of Serial Port in Embedded SystemConsole i/oWhile someone is working on an embedded system development project, they will certainly have a terminal emulator connected to a serial port on their target system. This is an independent function of the CPU architecture and the operating system it is running on. Even if there is a network connection to the target, and even if it is possible to run a remote shell, there will be a serial connection that can tell one what is going on, especially when something unexpected happens.
External Device CommunicationUpdating system parameters often requires a serial connection for a piece of equipment and interacting with a service program. This way network engineers routinely set up switches with other pieces of network infrastructure. Often the serial ports from a bank of equipment connect to a terminal server that allows the engineer to connect serial ports to any of the switches over a specific network interface.
Serial ports are also useful to connect equipment together, for instance, modems of one type or another (PSTN, 3G, satellite), telescopes, GPS units, sensors, power inverters, and many other types of industrial control equipment.
Data CommunicationsA serial port connection can be useful for inter-processor communication within a system or for communication having different parts of a system. The serial port will provide the physical connection between the equipment but you need to use a communication protocol that has to be used to ensure a completely reliable, error-free data path.
According to the requirements of the link, a simple ad-hoc protocol can be implemented or an industry-standard protocol, like PPP or HDLC, can be useful. These protocols have their roots in data communications that allow point-to-point networking between hosts. This is useful in simple, low-cost equipment that does not include any Ethernet controller for space, cost, or power considerations. TCP/IP stacks useful in embedded systems generally support using a serial link for any physical connection and PPP or SLIP for providing the link-layer protocol.
Modem Status Lines As GPIOIn addition to the Tx and Rx signals, many UARTs provide modem signals that may or may not be useful by the application. Console ports in my experience rarely use these additional signals so they can often be useful for some other purpose, assuming they are available and routed to the connector.
One thing they are often useful for is general-purpose outputs for debugging and timing. There are two outputs: RTS, DTR, and 4 inputs: CTS, DSR, DCD, RI. One can read the state of the inputs from a status register, and the state of the outputs is set by writing to a control register.
With the knowledge of the types and uses of serial cables, you will be able to use them more precisely. Make sure you are using proper cables for a particular purpose, otherwise there are chances that it might not work accurately or the cord would not fit in the cable. In recent times you may find HDMI cables in TV rather than serial cables. HDMI cables are parallel cables that support recent cables and connections. HDMI cables are also useful when serial cables are not available.
Jennifer Truong is the owner of SF Cable, a california based online retailer of all kind of Computers, electronics, electrical accessories, networking accessories, cables, wires. Jennifer has extensive experience in the Electronics industry and blog.