Serial communication, asynchronous/synchronous, UART, RS-232, USB webopedia.com Asynchronous Not synchronized; that is, not occurring at predetermined or regular intervals. The term asynchronous is usually used to describe communications in which data can be transmitted intermittently rather than in a steady stream. For example, a telephone conversation is asynchronous because both parties can talk whenever they like. If the communication were synchronous, each party would be required to wait a specified interval before speaking. The difficulty with asynchronous communications is that the receiver must have a way to distinguish between valid data and noise. In computer communications, this is usually accomplished through a special start bit and stop bit at the beginning and end of each piece of data. For this reason, asynchronous communication is sometimes called start-stop transmission. Most communications between computers and devices are asynchronous. There are two basic types of serial communications, synchronous and asynchronous. With Synchronous communications, the two devices initially synchronize themselves to each other, and then continually send characters to stay in sync. Even when data is not really being sent, a constant flow of bits allows each device to know where the other is at any given time. That is, each character that is sent is either actual data or an idle character. Synchronous communications allows faster data transfer rates than asynchronous methods, because additional bits to mark the beginning and end of each data byte are not required. The serial ports on IBM-style PCs are asynchronous devices and therefore only support asynchronous serial communications. Asynchronous means "no synchronization", and thus does not require sending and receiving idle characters. However, the beginning and end of each byte of data must be identified by start and stop bits. The start bit indicate when the data byte is about to begin and the stop bit signals when it ends. The requirement to send these additional two bits cause asynchronous communications to be slightly slower than synchronous however it has the advantage that the processor does not have to deal with the additional idle characters. An asynchronous line that is idle is identified with a value of 1, (also called a mark state). By using this value to indicate that no data is currently being sent, the devices are able to distinguish between an idle state and a disconnected line. When a character is about to be transmitted, a start bit is sent. A start bit has a value of 0, (also called a space state). Thus, when the line switches from a value of 1 to a value of 0, the receiver is alerted that a data character is about to come down the line. -------------------------- UART Pronounced u-art, and short for universal asynchronous receiver-transmitter, the UART is a computer component that handles asynchronous serial communication. Every computer contains a UART to manage the serial ports, and all internal modems have their own UART. As modems have become increasingly fast, the UART has come under greater scrutiny as the cause of transmission bottlenecks. If you are purchasing a fast external modem, make sure that the computer's UART can handle the modem's maximum transmission rate. The newer 16550 UART contains a 16-byte buffer, enabling it to support higher transmission rates than the older 8250 UART. ------------------------- Serial port. http://www.taltech.com/TALtech_web/resources/intro-sc.html Bi-Directional Communications The serial port on your PC is a full-duplex device meaning that it can send and receive data at the same time. In order to be able to do this, it uses separate lines for transmitting and receiving data. Some types of serial devices support only one-way communications and therefore use only two wires in the cable - the transmit line and the signal ground. Communicating by Bits Once the start bit has been sent, the transmitter sends the actual data bits. There may either be 5, 6, 7, or 8 data bits, depending on the number you have selected. Both receiver and the transmitter must agree on the number of data bits, as well as the baud rate. Almost all devices transmit data using either 7 or 8 databits. Notice that when only 7 data bits are employed, you cannot send ASCII values greater than 127. Likewise, using 5 bits limits the highest possible value to 31. After the data has been transmitted, a stop bit is sent. A stop bit has a value of 1 - or a mark state - and it can be detected correctly even if the previous data bit also had a value of 1. This is accomplished by the stop bit's duration. Stop bits can be 1, 1.5, or 2 bit periods in length. -- The Parity Bit Besides the synchronization provided by the use of start and stop bits, an additional bit called a parity bit may optionally be transmitted along with the data. A parity bit affords a small amount of error checking, to help detect data corruption that might occur during transmission. You can choose either even parity, odd parity, mark parity, space parity or none at all. When even or odd parity is being used, the number of marks (logical 1 bits) in each data byte are counted, and a single bit is transmitted following the data bits to indicate whether the number of 1 bits just sent is even or odd. For example, when even parity is chosen, the parity bit is transmitted with a value of 0 if the number of preceding marks is an even number. For the binary value of 0110 0011 the parity bit would be 0. If even parity were in effect and the binary number 1101 0110 were sent, then the parity bit would be 1. Odd parity is just the opposite, and the parity bit is 0 when the number of mark bits in the preceding word is an odd number. Parity error checking is very rudimentary. While it will tell you if there is a single bit error in the character, it doesn't show which bit was received in error. Also, if an even number of bits are in error then the parity bit would not reflect any error at all. Mark parity means that the parity bit is always set to the mark signal condition and likewise space parity always sends the parity bit in the space signal condition. Since these two parity options serve no useful purpose whatsoever, they are almost never used. RS-232 stands for Recommend Standard number 232 and C is the latest revision of the standard. The serial ports on most computers use a subset of the RS-232C standard. The full RS-232C standard specifies a 25-pin "D" connector of which 22 pins are used. Most of these pins are not needed for normal PC communications, and indeed, most new PCs are equipped with male D type connectors having only 9 pins. Baud vs. Bits per Second The baud unit is named after Jean Maurice Emile Baudot, who was an officer in the French Telegraph Service. He is credited with devising the first uniform-length 5-bit code for characters of the alphabet in the late 19th century. What baud really refers to is modulation rate or the number of times per second that a line changes state. This is not always the same as bits per second (BPS). If you connect two serial devices together using direct cables then baud and BPS are in fact the same. Thus, if you are running at 19200 BPS, then the line is also changing states 19200 times per second. But when considering modems, this isn't the case. Because modems transfer signals over a telephone line, the baud rate is actually limited to a maximum of 2400 baud. This is a physical restriction of the lines provided by the phone company. The increased data throughput achieved with 9600 or higher baud modems is accomplished by using sophisticated phase modulation, and data compression techniques. --------------------------- USB Short for Universal Serial Bus, an external bus standard that supports data transfer rates of 12 Mbps. A single USB port can be used to connect up to 127 peripheral devices, such as mice, modems, and keyboards. USB also supports Plug-and-Play installation and hot plugging. Starting in 1996, a few computer manufacturers started including USB support in their new machines. It wasn't until the release of the best-selling iMac in 1998 that USB became widespread. It is expected to completely replace serial and parallel ports. http://www.usb.org/developers USB: Developed to Simplify PC Peripheral Connections The Universal Serial Bus (USB) specification is a standardized peripheral connection developed by leading PC industry companies. USB makes plugging in new peripherals easy with plug and play, is nearly 100 times faster than the original serial port, and supports multiple device connectivity. Because of these benefits, USB is enjoying broad market acceptance today. USB allows expandability of the PC's capabilities via an external port, eliminating the need for users or integrators to open the system chassis. Since USB supports multiple peripheral devices simultaneously, it allows users to run numerous devices such as printers, scanners, digital cameras and speakers from a single PC. USB also allows for automatic device detection and installation, making connectivity a true plug-and-play experience for end users. USB's quick proliferation as the replacement for the serial port and other PC ports for I/O devices such as digital joysticks, phones, scanners and digital cameras has accelerated the production and availability of such devices. Several hundred of these devices are in the marketplace today, with many more on their way. In addition, virtually every new PC today has one or more USB ports, quickly moving the installed base of USB-capable PCs to the range of hundreds of millions. USB 2.0: An "Evolution" Underway USB 2.0 extends the speed of the connection from 12 Mbps on USB 1.1 up to 480 Mbps on USB 2.0, providing an attachment point for next-generation peripherals which complement higher performance PCs and user applications. USB 2.0 is both forward and backward compatible with USB 1.1, resulting in a seamless transition process for the end user. In fact, USB 2.0 uses the same cables and connectors as USB 1.1. USB 2.0 offers a compelling opportunity for peripherals vendors to migrate their USB peripherals to higher performance, while still being able to sell the same peripherals into the huge installed base of USB-capable PCs. USB 2.0 is also expected to lead to the development of higher performance peripherals that will bring new applications to the PC. USB 1.1's data rate of 12 Mbps is sufficient for many PC peripherals such as telephones, keyboards, mice, digital joysticks, floppy drives, digital speakers, and low-end printers. These peripherals will continue to operate with no change in USB 2.0 systems. The higher bandwidth of USB 2.0 will permit PC peripherals with more functionality, including higher resolution video conferencing cameras, next generation scanners and printers, fast storage units, and faster broadband Internet connections. It will make today's user applications more productive, such as taking the time to download a "roll" of digital photos from a few minutes on USB 1.1 down to a few seconds on USB 2.0. In addition, the higher bandwidth will support the most demanding PC user applications, such as digital image creation and interactive gaming, where multiple high-speed peripherals will be running simultaneously. The higher data rate of USB 2.0 will also open up the possibilities of new and exciting peripherals. As with USB 1.1, USB 2.0 is expected to eventually be in industry chipsets. Once these chipsets reach high volume, it is expected that USB 2.0 will be about the same cost as USB is today. Because of this, USB 2.0 is expected to supercede USB 1.1, which is already a ubiquitous connector on PC systems today. Also like USB 1.1, USB 2.0 will satisfy the peripheral-interface needs of desktops, mobile systems and other classes of host platforms. To satisfy the needs of power-sensitive applications such as notebook computers, USB 2.0 will provide the same power-management mechanisms as USB 1.1 to allow aggressive management of I/O power consumption. This is expected to allow USB 2.0 to find use even in demanding low-power systems. USB 2.0 and 1394 I/O connectivity is being further advanced with the IEEE 1394 standard. USB 2.0 and 1394 primarily differ in terms of application focus. The USB 2.0 Promoter group expects USB 2.0 to be the preferred connection for most PC peripherals, whereas IEEE 1394's primary target is audio/visual consumer electronic devices such as digital camcorders, digital VCRs, DVDs, and digital televisions. Both USB 2.0 and 1394 are expected to co-exist on many consumer systems in the future. USB 2.0 and 1394 differ in application focus because of continuous evolution of the current environment. Today, there is a large and rapidly increasing installed base of USB-capable PCs, and hundreds of USB peripherals in the marketplace that connect to the PC. It is a natural evolution to increase the speed of USB and provide an easy migration path for existing USB peripherals. In the A/V consumer electronics equipment industry, IEEE 1394 is on its way to becoming the dominant connector. Therefore, if a PC wants to connect to one of these devices, it needs an IEEE 1394 connection. They also support different connection models. USB 2.0 continues to use a low cost host-centric connection model, which is the best solution for a PC connection to PC peripherals. The added capability of a peer-to-peer connection enabled by IEEE 1394, however, allows a PC to connect to a cluster of consumer electronics devices, such as one that might exist in the family room. ---------------------------------- IEEE 1394 A very fast external bus standard that supports data transfer rates of up to 400 Mbps (400 million bits per second). Products supporting the 1394 standard go under different names, depending on the company. Apple, which originally developed the technology, uses the trademarked name FireWire. Other companies use other names, such as i.link and Lynx, to describe their 1394 products. A single 1394 port can be used to connect up 63 external devices. In addition to its high speed, 1394 also supports isochronous data -- delivering data at a guaranteed rate. This makes it ideal for devices that need to transfer high levels of data in real-time, such as video devices. Although extremely fast and flexible, 1394 is also expensive. Like USB, 1394 supports both Plug-and-Play and hot plugging, and also provides power to peripheral devices.