34
Serial Data Transfer As an example of serial data transfer using the shift register approach, a set of four shifts triggered by clock pulses places the contents of the X-register into the Y- register. Since four clock cycles are needed, it is much slower than parallel transfer , but is simpler and cheaper. In circuit designs, clock skew (sometimes timing skew) is a phenomenon in synchronous circuits in which the clock signal (sent from the clock circuit ) arrives at different components at different times. As the clock rate of a circuit increases, timing becomes more critical and less variation can be tolerated if the circuit is to function properly. Maheshwari, N., and Sapatnekar, S.S., Timing Analysis and Optimization of Sequential Circuits, Kluwer, 1999. serial communication is the process of sending data one bit at one time, sequentially, over a communication channel or computer bus . This is in contrast to parallel communication , where several bits are sent together, on a link with several parallel channels. Serial communication is used for all

Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

  • Upload
    dokhanh

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

Serial Data Transfer

As an example of serial data transfer using the shift register approach, a set of four shifts triggered by clock pulses places the contents of the X-register into the Y-register. Since four clock cycles are needed, it is much slower than parallel transfer, but is simpler and cheaper.

In circuit designs, clock skew (sometimes timing skew) is a phenomenon in synchronous circuits in which the clock signal (sent from the clock circuit) arrives at different components at different times.

As the clock rate of a circuit increases, timing becomes more critical and less variation can be tolerated if the circuit is to function properly.

Maheshwari, N., and Sapatnekar, S.S., Timing Analysis and Optimization of Sequential Circuits, Kluwer, 1999.

serial communication is the process of sending data one bit at one time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent together, on a link with several parallel channels. Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and synchronization difficulties make parallel communication impractical. At shorter distances, serial computer buses are becoming more common because of a tipping point where the disadvantages of parallel buses (clock skew, interconnect density) outweigh their advantage of simplicity (no need for serializer and deserializer (SERDES)). Improved technology to ensure signal integrity and to transmit and receive at a sufficiently high speed per lane have made serial links competitive. The migration from PCI to PCI Express is an example.

Page 2: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

Integrated circuits are more expensive when they have more pins. To reduce the pins, many ICs use a serial bus to transfer data when speed is not important. Some examples of such low-cost serial buses include SPI, I²C, and 1-Wire.

The communication links across which computers—or parts of computers—talk to one another may be either serial or parallel. A parallel link transmits several streams of data (perhaps representing particular bits of a stream of bytes) along multiple channels (wires, printed circuit tracks, optical fibres, etc.); a serial link transmits a single stream of data.

At first sight it would seem that a serial link must be inferior to a parallel one, because it can transmit less data on each clock tick. However, it is often the case that serial links can be clocked considerably faster than parallel links, and achieve a higher data rate. A number of factors allow serial to be clocked at a greater rate:

Clock skew between different channels is not an issue (for unclocked asynchronous serial communication links)

A serial connection requires fewer interconnecting cables (e.g. wires/fibres) and hence occupies less space. The extra space allows for better isolation of the channel from its surroundings

Crosstalk is less of an issue, because there are fewer conductors in proximity.

In many cases, serial is a better option because it is cheaper to implement. Many ICs have serial interfaces, as opposed to parallel ones, so that they have fewer pins and are therefore less expensive.

By convention, bus and network speeds are denoted either in bit/s (bits per second) or byte/s (bytes per second). In general, parallel interfaces are quoted in byte/s and serial in bit/s. The more commonly used is shown below in bold type.

On devices like modems, bytes may be more than 8 bits long because they may be individually padded out with additional start and stop bits; the figures below will reflect this. Where channels use line codes (such as Ethernet, Serial ATA and PCI Express), quoted speeds are for the decoded signal.

The figures below are simplex speeds, which may conflict with the duplex speeds vendors sometimes use in promotional materials. Where two values are listed, the first value is the downstream rate and the second value is the upstream rate.

All quoted figures are in metric decimal units, where:

1 byte = 8 bits 1 kbit = 1,000 bits 1 Mbit = 1,000,000 bits 1 Gbit = 1,000,000,000 bits 1 kB = 1,000 bytes

Page 3: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

1 MB = 1,000,000 bytes 1 GB = 1,000,000,000 bytes 1 TB = 1,000,000,000,000 bytes

Wireless networks

802.11 networks are half-duplex; all stations share the medium. In access point mode, all traffic has to pass through the AP (Access Point). Thus, two stations on the same AP which are communicating with each other must have each and every frame transmitted twice: from the sender to the access point, then from the access point to the receiver. This approximately halves the effective bandwidth.

Device   Speed (bit/s)   Speed (byte/s)  

802.11 (legacy) 0.125 2.0 Mbit/s 0.25 MB/s802.11b DSSS 0.125 11.0 Mbit/s 1.375 MB/s802.11b+ (TI-proprietary extension to 802.11b, non-IEEE standard[22][23]) DSSS 0.125 44.0 Mbit/s 5.5 MB/s

802.11a 0.75 54.0 Mbit/s 6.75 MB/s802.11g OFDM 0.125 54.0 Mbit/s 6.75 MB/s802.16 (WiMAX) 70.0 Mbit/s 8.75 MB/s802.11g with Super G (Atheros-proprietary extension to 802.11g) DSSS 0.125 108.0 Mbit/s 13.5 MB/s

802.11g with 125HSM (a.k.a. Afterburner, Broadcom-proprietary extension to 802.11g) 125.0 Mbit/s 15.625 MB/s

802.11g with Nitro (Conexant-proprietary extension to 802.11g) 140.0 Mbit/s 17.5 MB/s

802.11n Varies, 600.0 Mbit/s Max

Varies, 75 MB/s Max

Wireless personal area networksDevice   Speed (bit/s)   Speed (byte/s)  

IrDA-Control 72 kbit/s 9 kB/sIrDA-SIR 115.2 kbit/s 14 kB/s802.15.4 (2.4 GHz) 250 kbit/s 31.25 kB/sBluetooth 1.1 1,000 kbit/s 125 kB/sBluetooth 2.0+EDR 3,000 kbit/s 375 kB/sIrDA-FIR 4,000 kbit/s 510 kB/sIrDA-VFIR 16,000 kbit/s 2,000 kB/sIrDA-UFIR 100,000 kbit/s 12,500 kB/sBluetooth 3.0 480,000 kbit/s 60,000 kB/sWUSB-UWB 480,000 kbit/s 60,000 kB/s

Page 4: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

Computer busesDevice   Speed (bit/s)   Speed (byte/s)  

I2c 3.4 Mbit/s 425 kB/sISA 8-Bit/4.77 MHz[24] 9.6 Mbit/s 1.2 MB/sZorro II 16-Bit/7.14 MHz[25] 28.56 Mbit/s 3.56 MB/sISA 16-Bit/8.33 MHz[24] 42.4 Mbit/s 5.3 MB/sLow Pin Count 133.33 Mbit/s 16.67 MB/sHP-Precision Bus 184 Mbit/s 23 MB/sEISA 8-16-32bits/8.33 MHz 320 Mbit/s 32 MB/sVME64 32-64bits 400 Mbit/s 40 MB/sNuBus 10 MHz 400 Mbit/s 40 MB/sDEC TURBOchannel 32-bit/12.5 MHz 400 Mbit/s 50 MB/sMCA 16-32bits/10 MHz 660 Mbit/s 66 MB/sNuBus90 20 MHz 800 Mbit/s 80 MB/sSbus 32-bit/25 MHz 800 Mbit/s 100 MB/sDEC TURBOchannel 32-bit/25 MHz 800 Mbit/s 100 MB/sVLB 32-bit/33 MHz 1,067 Mbit/s 133.33 MB/sPCI 32-bit/33 MHz 1,067 Mbit/s 133.33 MB/sHP GSC-1X 1,136 Mbit/s 142 MB/sZorro III [26] [27] [28] 32-Bit/37.5 MHz 1,200 Mbit/s 150 MB/sSbus 64-bit/25 MHz 1,600 Mbit/s 200 MB/sPCI Express 1.0 (x1 link)[29] 2,000 Mbit/s 250 MB/sHP GSC-2X 2,048 Mbit/s 256 MB/sPCI 64-bit/33 MHz 2,133 Mbit/s 266.7 MB/sPCI 32-bit/66 MHz 2,133 Mbit/s 266.7 MB/sAGP 1x 2,133 Mbit/s 266.7 MB/sHIO bus 2,560 Mbit/s 320 MB/sPCI Express 1.0 (x2 link)[29] 4,000 Mbit/s 500 MB/sAGP 2x 4,266 Mbit/s 533.3 MB/sPCI 64-bit/66 MHz 4,266 Mbit/s 533.3 MB/sPCI-X DDR 16-bit 4,266 Mbit/s 533.3 MB/sPCI 64-bit/100 MHz 6,399 Mbit/s 800 MB/sRapidIO (1 lane) 6,500 Mbit/s 812,5 MB/sPCI Express 1.0 (x4 link) 8,000 Mbit/s 1,000 MB/sAGP 4x 8,533 Mbit/s 1,067 MB/sPCI-X 133 8,533 Mbit/s 1,067 MB/sPCI-X QDR 16-bit 8,533 Mbit/s 1,067 MB/sInfiniBand single 4X[21] 8,000 Mbit/s 1,000 MB/sUPA 15,360 Mbit/s 1,920 MB/s

Page 5: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

PCI Express 1.0 (x8 link)[29] 16,000 Mbit/s 2,000 MB/sAGP 8x 17,066 Mbit/s 2,133 MB/sPCI-X DDR 17,066 Mbit/s 2,133 MB/sHyperTransport (800 MHz, 16-pair) 25,600 Mbit/s 3,200 MB/sHyperTransport (1 GHz, 16-pair) 32,000 Mbit/s 4,000 MB/sPCI Express 1.0 (x16 link)[29] 32,000 Mbit/s 4,000 MB/sPCI Express 2.0 (x8 link)[30] 32,000 Mbit/s 4,000 MB/sPCI-X QDR 34,133 Mbit/s 4,266 MB/sAGP 8x 64-bit 34,133 Mbit/s 4,266 MB/sPCI Express (x32 link)[29] 64,000 Mbit/s 8,000 MB/sPCI Express 2.0 (x16 link)[30] 64,000 Mbit/s 8,000 MB/sPCI Express 2.0 (x32 link)[30] 128,000 Mbit/s 16,000 MB/sQuickPath Interconnect (2.4 GHz) 153,600 Mbit/s 19,200 MB/sHyperTransport (2.8 GHz, 32-pair) 179,200 Mbit/s 22,400 MB/sQuickPath Interconnect (3.2 GHz) 204,800 Mbit/s 25,600 MB/sHyperTransport 3.1 (3.2 GHz, 32-pair) 409,600 Mbit/s 51,200 MB/s

[edit] PortableDevice   Speed (bit/s)   Speed (byte/s)  

PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/sPC Card 16 bit 255ns Word mode 62.72 Mbit/s 7.84 MB/sPC Card 16 bit 100ns Byte mode 80 Mbit/s 10 MB/sPC Card 16 bit 100ns Word mode 160 Mbit/s 20 MB/sPC Card 32 bit (CardBus) Byte mode 267 Mbit/s 33.33 MB/sExpressCard 1.2 USB 2.0 mode 480 Mbit/s 60 MB/sPC Card 32 bit (CardBus) Word mode 533 Mbit/s 66.66 MB/sPC Card 32 bit (CardBus) DWord mode 1,067 Mbit/s 133.33 MB/sExpressCard 1.2 PCI Express mode 2,500 Mbit/s 312.5 MB/sExpressCard 2.0 USB 3.0 mode 4,800 Mbit/s 600 MB/sExpressCard 2.0 PCI Express mode 5,000 Mbit/s 625 MB/s

[edit] Storage

Device   Speed (bit/s)  

Speed (byte/s)  

PC Floppy Disk Controller (1.44MB) 0.5 Mbit/s 0.062 MB/s

CD Controller (1x) 1.171875 Mbit/s

0.146484375 MB/s

MFM 5 Mbit/s 0.625 MB/sRLL 7.5 Mbit/s 0.9375 MB/sDVD Controller (1x) 11.1 Mbit/s 1.32 MB/sESDI 24 Mbit/s 3 MB/sATA PIO Mode 0 26.4 Mbit/s 3.3 MB/s

Page 6: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

HD DVD Controller (1x) 36 Mbit/s 4.5 MB/sBlu-ray Controller (1x) 36 Mbit/s 4.5 MB/sSCSI (Narrow SCSI) (5 MHz)[31] 40 Mbit/s 5 MB/sATA PIO Mode 1 41.6 Mbit/s 5.2 MB/sATA PIO Mode 2 66.4 Mbit/s 8.3 MB/sFast SCSI (8 bits/10 MHz) 80 Mbit/s 10 MB/sATA PIO Mode 3 88.8 Mbit/s 11.1 MB/siSCSI over Fast Ethernet 100 Mbit/s 12.5 MB/sATA PIO Mode 4 133.3 Mbit/s 16.7 MB/sFast Wide SCSI (16 bits/10 MHz) 160 Mbit/s 20 MB/sUltra SCSI (Fast-20 SCSI) (8 bits/20 MHz) 160 Mbit/s 20 MB/sUltra DMA ATA 33 264 Mbit/s 33 MB/sUltra Wide SCSI (16 bits/20 MHz) 320 Mbit/s 40 MB/sUltra-2 SCSI 40 (Fast-40 SCSI) (8 bits/40 MHz) 320 Mbit/s 40 MB/sUltra DMA ATA 66 528 Mbit/s 66 MB/sUltra-2 wide SCSI (16 bits/40 MHz) 640 Mbit/s 80 MB/sSerial Storage Architecture SSA 640 Mbit/s 80 MB/sUltra DMA ATA 100 800 Mbit/s 100 MB/sFibre Channel 1GFC (1.0625 GHz)[32] 850 Mbit/s 106.25 MB/siSCSI over Gigabit Ethernet 1,000 Mbit/s 125 MB/sUltra DMA ATA 133 1,064 Mbit/s 133 MB/sUltra-3 SCSI (Ultra 160 SCSI; Fast-80 Wide SCSI) (16 bits/40 MHz DDR) 1,280 Mbit/s 160 MB/s

Serial ATA (SATA-150)[33] 1,200 Mbit/s 150 MB/sFibre Channel 2GFC (2.125 GHz)[32] 1,700 Mbit/s 212.5 MB/sSerial ATA 2 (SATA-300)[33] 2,400 Mbit/s 300 MB/sSerial Attached SCSI (SAS)[33] 2,400 Mbit/s 300 MB/sUltra-320 SCSI (Ultra4 SCSI) (16 bits/80 MHz DDR) 2,560 Mbit/s 320 MB/sFibre Channel 4GFC (4.25 GHz)[32] 3,400 Mbit/s 425 MB/sSerial ATA (SATA-600)[33] 4,800 Mbit/s 600 MB/sSerial Attached SCSI (SAS) 2[33] 4,800 Mbit/s 600 MB/sUltra-640 SCSI (16 bits/160 MHz DDR) 5,120 Mbit/s 640 MB/sFibre Channel 8GFC (8.50 GHz)[32] 6,800 Mbit/s 850 MB/siSCSI over 10GbE 10,000 Mbit/s 1,250 MB/sFCoE over 10GbE 10,000 Mbit/s 1,250 MB/siSCSI over InfiniBand 4x 40,000 Mbit/s 5,000 MB/s

iSCSI over 100G Ethernet (hypothetical)[citation needed] 100,000 Mbit/s 12,500 MB/s

Page 7: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

A wide variety of different wireless data technologies now exist, some in direct competition with one another, others designed to be optimal for specific applications. Wireless technologies can be evaluated by a variety of different metrics described below.

Of the standards evaluated, these can be grouped as follows:

UWB, Bluetooth, ZigBee, and Wireless USB are intended for use as so called Wireless PAN systems. They are intended for short range communication between devices typically controlled by a single person. A keyboard might communicate with a computer, or a mobile phone with a handsfree kit, using any of these technologies.

WiFi is the most successful system intended for use as a WLAN system. A WLAN is an implementation of a LAN over a microcellular wireless system. Such systems are used to provide wireless Internet access (and access to other systems on the local network such as other computers, shared printers, and other such devices) throughout a private property. Typically a WLAN offers much better bandwidth and latency than the user's Internet connection, being designed as much for local communication as for access to the Internet, and while WiFi may be offered in many places as an Internet access system, access speeds are usually more limited by the shared Internet connection and number of users than the technology itself. Other systems that provide WLAN functionality include DECT and HIPERLAN.

GPRS, EDGE and 1xRTT are bolt-ons to existing 2G cellular systems, providing Internet access to users of existing 2G networks (it should be noted that technically both EDGE and 1xRTT are 3G standards, as defined by the ITU, but are generally deployed on existing networks.) 3G systems such as EV-DO, W-CDMA (including HSDPA and HSUPA) provide combined circuit switched and packet switched data and voice services as standard, usually at better data rates than the 2G extensions. All of these services can be used to provide combined mobile phone access and Internet access at remote locations. Typically GPRS and 1xRTT are used to provide stripped down, mobile phone oriented, Internet access, such as WAP, multimedia messaging, and the downloading of ring-tones, whereas EV-DO and HSDPA's higher speeds make them suitable for use as a broadband replacement.

Pure packet-switched only systems can be created using 3G network technologies, and UMTS-TDD is one example of this. Alternatively, next generation systems such as WiMAX also provide pure packet switched services with no need to support the circuit switching services required for voice systems. WiMAX is available in multiple configurations, including both NLOS and LOS variants. UMTS-TDD, WiMAX, and proprietary systems such as Canopy are used by Wireless ISPs to provide broadband access without the need for direct cable access to the end user.

Some systems are designed for point-to-point line-of-sight communications, such as RONJA and IrDA; once 2 such nodes get too far apart to directly communicate, they can no longer communicate. Other systems are designed to form a wireless mesh network using one of a variety of routing protocols. In a mesh network, when 2 nodes get too far

Page 8: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

apart to directly communicate, they can still indirectly communicate through intermediate nodes.

FrequencyAllocated Frequencies

Standard Frequencies Spectrum Type

UMTS over W-CDMA 850 MHz, 1.9, 1.9/2.1, and 1.7/2.1 GHz Licensed (Cellular/PCS/3G/AWS)

UMTS-TDD450, 850 MHz, 1.9, 2, 2.5,

and 3.5 GHz[3]

2 GHz

Licensed (Cellular, 3G TDD, BRS/IMT-ext, FWA)Unlicensed (see note)

CDMA2000 (inc. EV-DO, 1xRTT)

450, 850, 900 MHz 1.7, 1.8, 1.9, and 2.1 GHz Licensed (Cellular/PCS/3G/AWS)

EDGE/GPRS 850 MHz 900 MHz 1.8 GHz 1.9 GHz Licensed (Cellular/PCS/PCN)

iBurst 1.8, 1.9 and 2.1 GHz LicensedFlash-OFDM 450 and 870 MHz Licensed

802.16e 2.3, 2.5, 3.5, 3.7 and 5.8 GHz Licensed802.11a 5.25, 5.6 and 5.8 GHz Unlicensed 802.11a and ISM

802.11b/g/n 2.4 GHz Unlicensed ISMBluetooth 2.4 GHz Unlicensed ISMWibree 2.4 GHz Unlicensed ISM

ZigBee 868 MHz, 915 MHz, 2.4 GHz Unlicensed ISM

Wireless USB, UWB 3.1 to 10.6 GHz Unlicensed UltrawidebandEnOcean 868.3 MHz Unlicensed ISM

Page 9: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit
Page 10: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit
Page 11: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit
Page 12: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit
Page 13: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

http://cnx.org/content/m12293/latest/

Serial communication is a popular means of transmitting data between a computer and a peripheral device such as a programmable instrument or even another computer. Serial communication uses a transmitter to send data, one bit at a time, over a single communication line to a receiver. You can use this method when data transfer rates are low or you must transfer data over long distances. Serial communication is popular because most computers have one or more serial ports, so no extra hardware is needed other than a cable to connect the instrument to the computer or two computers together.

Figure 1:

1: RS-232 Instrument,2: RS-232 Cable, 3: Serial Port Figure 1 (sercomm.png)

Serial communication requires that you specify the following four parameters:

Page 14: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

*

The baud rate of the transmission *

The number of data bits encoding a character *

The sense of the optional parity bit *

The number of stop bits

Each transmitted character is packaged in a character frame that consists of a single start bit followed by the data bits, the optional parity bit, and the stop bit or bits. Figure 2 shows a typical character frame encoding the letter m.

Figure 2Figure 2 (charframe.png)

Baud rate is a measure of how fast data are moving between instruments that use serial communication. RS-232 uses only two voltage states, called MARK and SPACE. In such a two-state coding scheme, the baud rate is identical to the maximum number of bits of information, including control bits, that are transmitted per second.

Page 15: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

MARK is a negative voltage, and SPACE is positive. Figure 2 shows how the idealized signal looks on an oscilloscope. The following is the truth table for RS-232:

Signal>3V=0

Signal 3 V 0

Signal>-3V=1

Signal -3 V 1

The output signal level usually swings between +12 V and -12 V. The dead area between +3 V and -3 V is designed to absorb line noise.

Page 16: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

A start bit signals the beginning of each character frame. It is a transition from negative (MARK) to positive (SPACE) voltage. Its duration in seconds is the reciprocal of the baud rate. If the instrument is transmitting at 9,600 baud, the duration of the start bit and each subsequent bit is about 0.104 ms. The entire character frame of eleven bits would be transmitted in about 1.146 ms.

Data bits are transmitted upside down and backwards. That is, inverted logic is used, and the order of transmission is from least significant bit (LSB) to most significant bit (MSB). To interpret the data bits in a character frame, you must read from right to left and read 1 for negative voltage and 0 for positive voltage. This yields 1101101 (binary) or 6D (hex). An ASCII conversion table shows that this is the letter m.

An optional parity bit follows the data bits in the character frame. The parity bit, if present, also follows inverted logic, 1 for negative voltage and 0 for positive voltage. This bit is included as a simple means of error handling. You specify ahead of time whether the parity of the transmission is to be even or odd. If the parity is chosen to be odd, the transmitter then sets the parity bit in such a way as to make an odd number of ones among the data bits and the parity bit. This transmission uses odd parity. There are five ones among the data bits, already an odd number, so the parity bit is set to 0.

The last part of a character frame consists of 1, 1.5, or 2 stop bits. These bits are always represented by a negative voltage. If no further characters are transmitted, the line stays in the negative (MARK) condition. The transmission of the next character frame, if any, is heralded by a start bit of

Page 17: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

positive (SPACE) voltage.

How Fast Can I Transmit?

Knowing the structure of a character frame and the meaning ofbaud rate as it applies to serial communication, you cancalculate the maximum transmission rate, in characters persecond, for a given communication setting. This rate is justthe baud rate divided by the bits per frame. In the previousexample, there are a total of eleven bits per characterframe. If the transmission rate is set at 9,600 baud, you get

9,60011=872

9,600 11 872 characters per second. Notice that this is themaximum character transmission rate. The hardware on one endor the other of the serial link might not be able to reachthese rates, for various reasons.

Hardware Overview

There are many different recommended standards of serial portcommunication, including the following most common types.

RS-232

The RS-232 is a standard developed by the Electronic Industries Association (EIA) and other interested parties, specifying the serial interface between Data Terminal Equipment (DTE) and Data Communications Equipment (DCE). The

Page 18: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

RS-232 standard includes electrical signal characteristics (voltage levels), interface mechanical characteristics (connectors), functional description of interchange circuits (the function of each electrical signal), and some recipes for common kinds of terminal-to-modem connections. The most frequently encountered revision of this standard is called RS-232C. Parts of this standard have been adopted (with various degrees of fidelity) for use in serial communications between computers and printers, modems, and other equipment. The serial ports on standard IBM-compatible personal computers follow RS-232.

RS-449, RS-422, RS-423

The RS-449, RS-422, and RS-423 are additional EIA serial communication standards related to RS-232. RS-449 was issued in 1975 and was supposed to supersede RS-232, but few manufacturers have embraced the newer standard. RS-449 contains two subspecifications called RS-422 and RS-423. While RS-232 modulates a signal with respect to a common ground, or single-ended transmission, RS-422 modulates two signals against each other, or differential transmission. The RS-232C receiver senses whether the received signal is sufficiently negative with respect to ground to be a logical 1, whereas the RS-422 receiver senses which line is more negative than the other. This makes RS-422 more immune to noise and interference and more versatile over longer distances. The Macintosh serial ports follow RS-422, which can be converted to RS-423 by proper wiring of an external cable. RS-423 can then communicate with most RS-232 devices over distances of 15 m or so.

RS-232 Cabling

Devices that use serial cables for their communication are split into two categories. These are DCE and DTE. DCE are devices such as a modem, TA adapter, plotter, and so on, while DTE is a computer or terminal. RS-232 serial ports come in two sizes, the D-Type 25-pin connector and the D-Type 9-pin connector. Both of these connectors are male on the back of the PC. Thus, you require a female connector on the device. Table 1

shows the pin connections for the 9-pin and 25-pin D-Type connectors.

Page 19: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

Figure 3Figure 3 (dtypepin.png)Table 1

Function Signal PIN DTE DCE

Data TxD 3 Output Input

RxD 2 Input Output

Handshake RTS 7 Output Input

CTS 8 Input Output

DSR 6 Input Output

Page 20: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

DCD 1 Input Output

STR 4 Output Input

Common Com 5 -- --

Other RI 9 Output Input

The DB-9 connector is occasionally found on smaller RS-232 lab equipment. It is compact, yet has enough pins for the core set of serial pins (with one pin extra).

Note:

The DB-9 pin numbers for transmit and receive (3 and 2) are opposite of those on the DB-25 connector (2 and 3). Be careful of this difference when you are determining if a device is DTE or DCE.

Page 21: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

The DB-25 connector is the standard RS-232 connector, with enough pins to cover all the signals specified in the standard. Table 2 shows only the core set of pins that are used for most RS-232 interfaces.

Figure 4Figure 4 (db25pin.png)Table 2

Function Signal PIN DTE DCE

Data TxD 2 Output Input

RxD 3 Input Output

Handshake RTS 4 Output Input

CTS 5 Input

Page 22: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

Output

DSR 6 Input Output

DCD 8 Input Output

STR 20 Output Input

Common Com 7 -- --

Software Overview

Use the VIs and functions located on the Functions>>AllFunctions>>Instrument I/O>>Serial palette for serialport communication.

You used some of the VISA functions on this palette for GPIBcommunication. The VISA Write and VISA

Page 23: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit

Read functions work with any type of instrumentcommunication and are the same whether you are doing GPIB orserial communication. However, because serial communicationrequires you to configure extra parameters, you must start theserial port communication with the VISA Configure SerialPort VI.

The VISA Configure Serial Port VI initializes theport identified by VISA resource name to thespecified settings. timeout sets the timeoutvalue for the serial communication. baud rate,data bits, parity, and flowcontrol specify those specific serial portparameters. The error in and errorout clusters maintain the error conditions for this VI.

Example 1

Figure 5 shows how to send the identification query command *IDN? to the instrument connected to the COM2 serial port. The VISA Configure Serial Port VI opens communication with COM2 and sets it to 9,600 baud, eight data bits, odd parity, one stop bit, and XON/XOFF software handshaking. Then the VISA Write function sends the command. The VISA Read function reads back up to 200 bytes into the read buffer, and the Simple Error Handler VI checks the error condition.

Figure 5Figure 5 (serialVISAcnfg.png)Note:

The VIs and functions located on the Functions>>AllFunctions>>Instrument I/O>>Serial palette are also usedfor parallel port communication. You specify the VISA resourcename as being one of the LPT ports. For example, you can useMAX to determine that LPT1 has a VISA resource name ofASRL10::INSTR.

Page 24: Serial Data Transfer - Michigan State Web viewAs an example of serial data transfer ... Improved technology ... PC Card 16 bit 255ns Byte mode 31.36 Mbit/s 3.92 MB/s PC Card 16 bit