1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 -...

67
1 PC Peripherals PC Peripherals for Technicians for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Interfaces: Serial Port Port Systems Manufacturing Systems Manufacturing Training and Employee Training and Employee Development Development Copyright © 1998 Intel Copyright © 1998 Intel Corp. Corp.
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    233
  • download

    4

Transcript of 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 -...

Page 1: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

1

PC PeripheralsPC Peripherals for for TechniciansTechnicians Chapter 1.1 - Chapter 1.1 -

Interfaces: Serial PortInterfaces: Serial Port

Systems Manufacturing Training Systems Manufacturing Training and Employee Developmentand Employee Development

Copyright © 1998 Intel Corp.Copyright © 1998 Intel Corp.

Page 2: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

2

The Serial PortThe Serial PortOBJECTIVES: At the end of this section, the

student will be able to do the following: Describe UART functions & list the I/O addresses used Discuss the Serial data format & the RS-232C Standard Describe the Registers & Connector signal definitions Discuss the use of loopbacks & Serial BIOS support Describe the Serial Infrared interface. Discuss characteristics and features of modems.

Page 3: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

3

Serial Port Introduction The asynchronous serial port on the PC converts data

from parallel form to serial form for communications between computers and external devices.PCs typically support up to 4 serial ports (Com1-Com4).

The physical connection consists of an RS-232C standard cable linking the two devices.Other serial port specifications exist, such as RS-422, Bi-

Sync, Sync Data Link Control (SDLC), IEEE-488 (GPIB) etc., but the BIOS only supports RS-232C serial ports.

The terms “serial port”, “com port”, “RS-232C port”, “serial interface card”, “asynchronous data communications port” are equivalent.

Page 4: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

4

Serial Port Introduction Serial ports transmit data 1 bit at a time (in a serial

fashion), are bi-directional, and are commonly used for communicating with:Telephone modems & fax machinesmice & trackballssome printersother PCs (data transfer programs such as Laplink)data acquisition & control

» Bar code readers, cash registers, scales

networks (e.g. AppleTalk)

Note: Since all COM ports are the same except for address, this discussion will use COM1 in examples.

Page 5: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

5

Serial Port Introduction

UART REGS:OFFSET 0 Tx BFR(WR); Rx BFR(RD)OFFSET 4 MDM CTL REG (MCR)OFFSET 6 MDM STATUS REG (MSR)

1.84 MHzOscillator

Bi-directionalBus

Transceiver

AddressDecodeLogic

Chip Select

Reset

A0

A1

A2

DataD7 - D0

IOR

IOW

IRQ

PC Bus Serial Port RS-232Interface

9-pinConn

UARTReg

P-3

P-4

P-7

P-1

P-9

P-6

P-8

P-2

Tx BFR

MCR-0

MCR-1

MSR-7

MSR-6

MSR-5

MSR-4

Rx BFR

SOUT

DTR

RTS

UART

DCD

RI

DSR

CTS

SIN

XIN

MR

A0

A1

A2

CS2

D7 - D0

RD

WR

INTR

OUT2

+5 +12

T x D

DTR

RTS

DCD

RI

DSR

CTS

R x D

AddrA9 - A3

-12

1.84 MHz derived from 24MHz/13 on PC87306

Page 6: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

6

Universal Async Rcvr Transmitter The serial port on a PC is little more than a UART

(pronounced “yoo-art”) and RS-232 interface circuitry connected to the PC bus.The PC controls the UART by writing & reading internal

registers through a set of I/O ports.The RS-232 interface circuitry converts the UART TTL-

level signals into RS-232 signals (+/- 12 Volt). Since about 1990 the UART has been integrated into an

LSI chip (ASIC) such as the National Semiconductor PC87308 Super I/O Controller.

» These chips usually contain 2 UARTS (COM1 & COM2), a parallel port, a floppy disk interface, etc--all in one chip.

» The RS-232 interface circuitry (line drivers) are external to the Super I/O Controller.

Page 7: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

7

Universal Async Rcvr Transmitter The primary functions of the UART are to:

Perform the parallel-serial conversion (and vice versa).» Outgoing data is converted from the parallel format used by

the PC data bus to the serial format used by the serial port.

» Incoming serial data is converted to parallel data.

Inserting or checking the start, stop & (optional) parity bits.

Provide handshaking signals.» Request to Send (RTS), Data Set Ready (DSR), etc

Simultaneously transmit & receive serial data» The UART has separate Transmit & Receive data lines that

support full duplex communications.

Page 8: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

8

Enhanced Serial Ports A UART chip was used in terminals & minicomputers

for a decade before the first IBM PC came out. The PC COM port is based on chips compatible with the

National Semiconductor 8250 which was used in the serial ports of PC or XT computers,

This was followed by the 16450, used in the serial ports of 80286 (PC/AT) & newer machines, up to about 1996.

» Functionally the 16450 is identical to the 8250, except the read-and-write cycle times are cut in half to keep up with the faster 80286 access cycles.

» Though the 16450 can keep up with faster computers (PC/AT), it cannot transfer data any faster because the baud rates are still the same.

Page 9: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

9

Enhanced Serial Ports The next UART was the 16550 chip.

The 16550 is a 16450 chip with a FIFO queue - a buffer that holds 16 bytes of incoming or outgoing data.

» What's received first is moved out first, hence the acronym FIFO (first in, first out) to describe the buffering system.

You can't make use of the FIFO features unless the software you are using is aware of the 16550 UART chip

» FIFO buffers aren't accessible unless activated by software.

The 16550 is otherwise identical to its predecessors and so it can be used as a 16450 or 8250 hardware replacement.

The 16650 was next with a FIFO that holds 32 bytes of incoming/outgoing data.

Page 10: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

10

Serial Port Names, Addresses, & IRQs During POST, the BIOS checks the following I/O Base

addresses for UARTS (in this order): 3F8h - 3FFh: BIOS Serial Port 0 - O/S COM1 (DOS, etc)2F8h - 2FFh: BIOS Serial Port 1 - O/S COM23E8h - 3EFh: BIOS Serial Port 2 - O/S COM32E8h - 2EFh: BIOS Serial Port 3 - O/S COM4

Each serial port is accessed as a set of eight consecutive I/O registers offset from the Base AddressTo detect an active port, some versions of BIOS read the

Interrupt ID Register at Base+2 (e.g. 3FA).» If bits 7-3 are 0, the POST considers this an active port.

Note: Some BIOS versions don’t check for COM3/4.

Page 11: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

11

Serial Port Names, Addresses, & IRQs The BIOS stores the base addresses (2 bytes) of

detected serial ports in consecutive locations in a table starting at main memory address 0x40:0.This is the BIOS Data Area (400h-500h)

The BIOS can manage up to four different UARTs, because the table has four entries.The first entry in the BIOS table at 0x400 (40:0) is COM1

» The COM1 serial port base address is most often 0x3F8> 0000:0400 F8 03 (03F8h stored in little endian format)

the 2nd (40:2) COM2; the 3rd (40:4) COM3and the 4th (40:6) COM4 (if there are that many).

Page 12: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

12

Serial Port Names, Addresses, & IRQs There are only two IRQ lines assigned for use by COM

ports: IRQ 3 and IRQ 4In theory, this means that you can only have a maximum

of two serial ports.However, you can have more (i.e. COM3 and COM4) by

sharing the interrupts. » By convention, COM 1 & COM 3 share the IRQ4 line and

COM 2 & COM 4 share the IRQ3 line.

Note: You cannot use these ports simultaneously (i.e. COM 1 and COM 3) when sharing interrupts unless they are being controlled by the same application

» Some serial cards allow you to select non-standard IRQ's:> Typically any of IRQ’s 2,3,4,5,7 or 9-13 might be used .

Page 13: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

13

Asynchronous Serial Communications The information contained in the serial bit stream is

represented by codes that are each transmitted for a fixed time period known as the Baud Period.One bit is transmitted during each baud period.The transmit & received clocks must be synchronized

and be the same baud rate.» This is asynchronous - the receiver resynchronizes itself to

the transmitter using the start bit of each frame.

Baud Rate is the number of Bits Per Second (1/[baud period]) transmitted or received by the serial port .

» The Serial Port Baud Rate is not the same as the number of data bits to or from CPU due to the additional Start, Stop, & Parity bits inserted by the UART.

Page 14: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

14

Asynchronous Serial Communications The serial frame consists of a combination of the start,

data, parity, and stop bits.The frame size depends on UART control options

selected by software.» The data portion can be 5-8 bits. (Reset default = 5 bits )

» The parity bit can be optionally included

» One or two stop bits can be selected.

The serial framing protocol is usually described by a sequence of numbers and letters.

» e. g. 8n1 means 8 bits of data, no parity bit, 1 stop bit, and 1 start bit (always the same, thus omitted).

» e.g. 7e1 would indicate 7 bits of data, even parity, 1 stop bit.

Page 15: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

15

Asynchronous Serial Communications The start bit indicates the beginning of a new single

character & synchronizes the transmitter and receiver.It is always a logical '0' as output from the UART.

Data is transmitted LSB to MSB: The least significant bit (LSB, Bit 0) is transmitted first with 4 to 7 bits of data following, resulting in 5 to 8 bits of data per frame.

The PC is capable of serial transmission at up to 115,200 bps.Standard rates are 300, 1200, 2400, 4800, 9600, 14400,

19200, 38400, 57600 and 115200 bps .» Baud rates are derived by dividing the 1.84 MHz input by

the divisor specified in the Divisor Latch registers. > The 1.84 MHz derived from 24MHz/13 on the PC87306.

Page 16: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

16

Asynchronous Serial Communications A parity bit can be added to the data bits to allow error

detection. Two types of parity are commonly used: odd and even.Odd parity means that the number of 'ones' or ‘mark’ bits

in the data byte (including an optional parity bit, but not the framing bits) is always odd, so the parity bit is set accordingly.

The stop bit separates two consecutive bytes by putting the line into the quiescent state (the stop bit is a logical '1') for a minimum time in order for the next start bit (a logical '0') to be clearly visible.

Page 17: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

17

The RS-232C Interface Standard RS-232 is officially known as Electronics Industries

Association (EIA) Standard RS232C for low speed serial data communication..

» RS-232 is intended for relatively short distances (50 feet or less), and relatively low speed (19,200 bits per second or less) serial communications.

The RS-232C interface standard defines various connection parameters, including connector type, I/O signal levels, line names, and pin numbers.

» The DB-25S and DB-25P (25-pin) connectors (sometimes called "EIA connectors") are recommended, but are not mandatory.

» PC compatible computers commonly use a 9-pin D-sub (DB-9S) male connector.

Page 18: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

18

The RS-232C Interface Standard Much of the RS-232 standard is concerned with

support of Modems. There are two main classes of RS-232 devices:

DTE (Data Terminal Equipment)» Computers (PCs) and terminals are called (DTE).

DCE (Data Communication Equipment)» Modems are Data Communications Equipment (DCE).

Typically a serial port on a PC is considered DTE and a modem DCE.IBM saw the original PC as a Terminal device (DTE),

meant to be connected to a mainframe (DCE)» As a result, all PCs have DTE serial interfaces.

Page 19: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

19

The RS-232C Interface Standard The RS-232 standard defines a set of wires that run

between the DTE and DCE devices.Signal names are from the viewpoint of the DTE (PC).

» The ground is the reference point against which all the

signals are measured.

The wire carrying data from the computer to the modem is called the Transmit wire (Transmit Data, TD or TxD), i.e. Transmit Data is data being sent by the DTE (PC),

but received by the DCE (modem).

The wire carrying data in the opposite direction is called the Receive wire (Receive Data, RD or RxD)

Page 20: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

20

The RS-232C Interface StandardNote: PC systems commonly use +/- 12 volts & the

voltages are with respect to the Signal Ground line. RS-232 data looks upside down compared to normal

logical systems and the signals are not TTL levels:» Voltage Data Signal Control

> +3 to +15 0 SPACE On> -3 to -15 1 MARK Off

This dates back to the teletype protocol which used a current loop to continuously monitor the state of the line.

» Current flow was regarded as a “1” & was “MARK”-ing time

» A DATA signal then left a “SPACE” in the graph of the current flow designating a zero.

Page 21: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

21

The RS-232C Interface Standard Using an O’scope to view the Serial Data 5B hex

Note that RS-232 looks upside down compared to normal logical systems: Start Bit (Logical 0) = RS-232 +12V

Using 2400 baud rate: 1 / 2400 = 417 microseconds

Bit stream in binary is 01011011 (LSB first, MSB last)

417 uS 417 uS 417 uS 417 uS 417 uS 417 uS 417 uS 417 uS 417 uS 417 uS

4.17 ms

0 1 1 0 1 1 0 1 0 1+ 12v

RS-232

- 12v

START STOP BIT BT 0 BT 1 BT 2 BT 3 BT 4 BT 5 BT 6 BT 7 BIT

LSB MSB

0VTTL+5V

Page 22: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

22

Serial Port PinoutSerial Port DB9-Male DB25-Male

9-pin 25-pin assignment

1 8 DCD (Data Carrier Detect)2 3 RD (Receive Data)3 2 TxD (Transmit Data)4 20 DTR (Data Terminal Ready)5 7 GND (Signal Ground)6 6 DSR (Data Set Ready)7 4 RTS (Request To Send)8 5 CTS (Clear To Send)9 22 RI (Ring Indicator)

Looking at PC Serial PortDB-9S Connector (Male)

DCD RxD TxD DTR GND

DSR RTS CTS RI

1 2 3 4 5

6 7 8 9

The input & output signals are made available through a 9-pin or 25-pin, D-type connector.

This male connector protrudes through the rear panel of the system, where a cable may be attached.

Page 23: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

23

Serial Port Registers Debug techs may have occasion to use the following

registers, usually with a loopback connector attached.When debugging Serial Port problems, the majority of the

system board should be functional and using BIOS interrupts in “procs” with a debug tool such as the In Target Probe is fast and practical.

A COM port occupies 8 consecutive I/O addresses COM1 starts at 03F8 and ends at 03FFCOM2 starts at 02F8 and ends at 02FF.

» Each of these one byte addresses performs a specific function.

Note: A detailed description of UART programming is outside the scope of this course.

Page 24: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

24

Serial Port Registers Port 0x3F8 is used to transfer data (TxD, RD)

Anything written to 03F8 will be sent to the output, if the appropriate handshake signals are asserted.

Reading from 03F8 will obtain the next byte of data.

Writing to the Modem Control Reg (Port 3FC) provides control of output signals sent to the connector.Use to Set/Clear DTR (MCR bit 0) & RTS (MCR bit 1)

Reading the Modem Status Register (Port 0x3FE) reports the status of input signals on the connector. Read state of the DCD, RI, DSR, & CTS (MSR bits 7-4).

There are also addresses to set the speed, parity, stop bits, and character size.

Page 25: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

25

Serial Port RegistersCOM1 Base Addr Register

3F8 Base+0 Receive buffer (read) (if LCR bit 7=0)

3F8 Base+0 Transmit buffer (write) (if LCR bit 7=0)

3F8 Base+0 Divisor latch low byte (if LCR bit 7=1)

3F9 Base+1 Interrupt Enable (IER) (if LCR bit 7=0)

3F9 Base+1 Divisor latch high byte (if LCR bit 7=1)

3FA Base+2 Interrupt Flag Register (IFR)

3FB Base+3 Line Control Register (LCR)

3FC Base+4 Modem Control Register (MCR)

3FD Base+5 Line Status Register (LSR)

3FE Base+6 Modem Status Register (MSR)

3FF Base+7 Scratch pad (Not in original UART)

» Set LCR (3FB) Bit 7=1 to program the baud rate (divides the 1.84 MHz Oscillator by the specified divisor in 3F8 &3F9).

Page 26: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

26

Serial Port Registers

UART REGS:

OFFSET 0 (3F8) Tx BFR (WRITE) Rx BFR (READ)

OFFSET 4 (3FC) MDM CTL REG (MCR)

OFFSET 6 (3FE) MDM STATUS REG (MSR)

UARTReg

Tx BFR

MCR-0

MCR-1

MSR-7

MSR-6

MSR-5

MSR-4

Rx BFR

Serial PortRS-232Interface

SOUT

DTR

RTS

UART

DCD

RI

DSR

CTS

SIN

XIN

MR

A0

A1

A2

CS2

D7 - D0

RD

WR

INTR

OUT2

+5 +12

T x D

DTR

RTS

DCD

RI

DSR

CTS

R x D

-12

Page 27: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

27

Hardware & Software Handshaking Handshaking is a method of exchanging signals for

data flow control between computers.Hardware: RTS & CTS (Request To Send & Clear To

Send) have been specially designed for data flow control.» Used with UARTS & modems which transfer binary data.

Software: An often used software protocol is called XON/XOFF (Transmission On / Transmission Off).

» Uses two bytes in the ASCII character set:> XON (11h, Ctrl-Q, DC1); XOFF (13h, Ctrl-S, DC3).

» One of the sides sends an XOFF to interrupt the data flow.

» Used for Text transfers only - won’t contain 11h or 13h.

» Often used with terminals, printers, & plotters. > e.g. - “CTRL-S” stops scrolling of text on the terminal.

Page 28: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

28

DESCRIPTION OF COMMON SIGNALSA typical Serial Transmit control sequence example:

1. The PC (DTE) asserts DTR (Data Terminal Ready) to indicate that it is active and ready for transmission.

2. The Modem (DCE) responds by asserting the DSR line (Data Set Ready), indicating that it is also ready for communications.

3. The PC (DTE) asserts the RTS line (Request To Send) to indicate that it is ready to start transmitting.

4. The Modem (DCE) responds by asserting the Clear To Send line, indicating that it is ready to receive data.

5. Data is now transmitted on the TD and RD lines. > Cannot transmit until DTR, DSR, RTS, & CTS =1

6. The PC drops Data Terminal Ready to disconnect.

Page 29: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

29

DESCRIPTION OF COMMON SIGNALSSee the ‘Appendix A’ for a more complete description of the signals.

TxD (Transmit Data): Output - Pin 3 Data is sent from the DTE (PC) to the DCE (modem)

» Cannot transmit until DTR, DSR, RTS, & CTS =1

RD, RxD, Sin (Receive Data): Input - Pin 2 Serial data is sent from the DCE to the DTE (PC).

GND, SG (Signal Ground): Pin 5This is the ground to which all other voltages are relative.

The following control lines each have two states.High or asserted (+12v) state indicates the control line is

active -- the CONTROL signal is ON. Low (de-asserted) state indicates the line is inactive.

Page 30: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

30

DESCRIPTION OF COMMON SIGNALS DTR (Data Terminal Ready): Output - Pin 4

This signal informs the DCE (modem, fax, etc) that the DTE (PC) is powered up and ready to go.

Set to +12v (Control Signal ON) by MCR bit 0 = 1 » e.g. write 01h (0000 0001y) to 3FCh [ITP uses ‘y’ for binary]

» Note: This sets DTR# = 0 (from the UART) which is inverted to +12v by the RS-232 interface circuitry (line driver).

DSR (Data Set Ready): Input - Pin 6 This signal informs the DTE (PC) that the DCE

(modem, fax, etc) is powered up and ready to go.+12v sets MSR bit 5 = 1

» e.g. read 20h (0010 0000y) from 3FEh [Modem Status Reg]

NOTE: Loopbacks typically tie DTR to DSR.

Page 31: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

31

DESCRIPTION OF COMMON SIGNALS RTS (Request To Send): Output - Pin 7

Indicates that the DTE (PC) wishes to send data to the DCE (modem, fax, etc)

Set to +12v by MCR bit 1 = 1 » e.g. write 2h (0000 0010y) to 3FCh [Modem Control Reg]

CTS (Clear To Send): Input - Pin 8 Indicates that the DCE (modem, fax, etc) is ready to

accept data from the DTE (PC).+12v sets MSR bit 4 = 1

» e.g. read 10h (0001 0000y) from 3FEh [Modem Status Reg]

NOTE: Loopbacks typically tie RTS to CTS.

Page 32: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

32

DESCRIPTION OF COMMON SIGNALS RI (Ring Indicator): Input - Pin 9

The DCE (modem, fax, etc) indicates to the DTE (PC) that the phone line connected to the attached device (modem) is ringing.

+12v sets MSR bit 6 = 1» e.g. read 40h (0100 0000y) from 3FEh [Modem Status Reg]

DCD (Data Carrier Detect): Input - Pin 1 This is the signal the DCE (modem, fax, etc) uses to

inform the DTE (PC) that it has detected a carrier signal.

+12v sets MSR bit 7 = 1 » e.g. read 80h (1000 0000y) from 3FEh [Modem Status Reg]

Page 33: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

33

Serial Port Loopbacks & Testing

A common serial loopback is a female 9-pin D-sub connector with the following pins wired together.

» RTS (pin 7) - (pin 8) CTS - (pin 1) DCD > Registers : MCR-bit 1 to MSR-bit 4 to MSR-bit 7

» DTR (pin 4) - (pin 6) DSR - (pin 9) RI> Registers : MCR-bit 2 to MSR-bit 5 to MSR-bit 9

» SOUT [TxD] (pin 3) - (pin 2) SIN[RD]> Registers: Xmit Buffer (write) & Rcv Buffer (read)

A Loopback Connector has some of the output pins wire connected to some of the input pins.

When placed on the board's serial port connector, data sent out is received back by the same port.

DCD RxD TxD DTR GND

DSR RTS CTS RI

1 2 3 4 5

6 7 8 9

Looking at DB-9S Connector (Male)

Page 34: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

34

Serial Port Loopbacks & Testing Testview provides comprehensive diagnostics

designed to test the functionality of the serial ports. One test of the serial port checks the 8-bit data bus to

the UART and it’s ability to transmit and receive data with and without the loopback connector attached.This is accomplished by writing data patterns to the serial

controller (at port 0x3F8) & reading the data back.» The Line Control Register is configured for 8 data bits.

> This can also be set by writing 03h to Port 3FB with the ITP.

» Then the UART is tested by transmitting bytes such as 0xf0, 0xcc, 0xaa, and 0x55.

» If the four bytes are successfully received as they are looped back, the test passes.

Page 35: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

35

Serial Port Loopbacks & Testing The UART can be tested without the external loopback

by setting Bit 4 of the Modem Control Register to place the controller into Internal loopback mode.

» Writing 10h (0001 0000y) to Port 3FCh sets bit 4 of MCR.

The xmit & rcv data buffers are internally looped back & some control outputs are internally connected to inputs.

» RTS# - CTS#; DTR# - DSR#; OUT1# - RI#; OUT2# - DCD# > i.e. MSR bit 4 (CTS) shows the state of RTS (MCR bit 1).

If the UART passes the internal loopback test, but fails with the external loopback attached:

» Suspect the connector or lines to/from the connector or the RS-232 interface circuitry (usually implemented externally)

> Make sure that the external loopback connector is properly seated and is wired correctly.

Page 36: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

36

Serial Port BIOS Support Serial port support by the ROM BIOS uses INT 14h

and is very limited, but can be useful for looping with ITP debug procs.The BIOS functions historically do not use the serial port

interrupt feature, but use software timing loops instead.» Programs that do not use interrupts are speed restrained

because the UART must be polled frequently to prevent character loss.

NOTE: Many commercial communications programs access the UART directly and use interrupts to maximize performance.

» An interrupt is generated whenever a character is received by the port, or to request another byte when a previous block of data has been sent to the modem.

Page 37: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

37

Serial Port BIOS SupportCall INT 14h with AH=0 to initialize the port

» DX = port number (00h-03h) - e.g. DX=00 for COM1

» AL = port parameters (see below) > Bit(s) Description > 7-5 data rate (e.g. 300, 2400, 9600 bps etc)> 4-3 parity (00 or 10 = none, 01 = odd, 11 = even) > 2 stop bits (set = 2, clear = 1) > 1-0 data bits (00 = 5, 01 = 6, 10 = 7, 11 = 8)

» Return : AH = line status (see AH=03h in Appendix B)

» Calling INT 14h with AH =0 and AL= a3h (10100011y), selects 2400 baud, no parity, 1 stop, & 8 data bits.

Note: Writing 03h to Port 3FB (Line Control Reg ) with an ITP will also select 8 data bits, 1 stop bit, & no parity.

» A hardware reset sets the default number of data bits to 5.

Page 38: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

38

Serial Port BIOS SupportCall INT 14h with AH=1 to send a byte to a port.

» AH = 01h; AL = character to write

» DX = port number (00h-03h)

» Return: AH bit 7 clear if successful > AH bit 7 set on error > AH bits 6-0 = port status (see AH=03h in Appendix B)

Call INT 14h with AH=2 to read a byte from a port.» AH = 02h; DX = port number (00h-03h)

» Return: AH bit 7 clear if successful > AH = line status (see AH=03h) > AL = received character if AH bit 7 clear

See App B for information on AH=3

Page 39: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

39

The Serial Infrared Interface Infrared (IR) connectivity allows for the wireless

exchange of data between computer devices such as:Desktop/laptop/notebook PCs, printers, fax machines,

network nodes, data modems, telephones, automated tellers, PDAs, electronic organizers, etc.

The Infrared Data Association (IrDA) is a group of component, computer system, & peripheral vendors.

The IrDA standard for wireless data communications uses high-speed, infra-red communications (the same basic technology used in TV remote controls)IrDA provides for data to be transmitted/received at a

speed of 9.6Kbps to 4.0Mbps, at distances of up to three meters, and with a reception angle of 30 degrees.

Page 40: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

40

The Serial Infrared Interface The IR transmit interface translates the data from the

UART into pulses which are output through an LED.The LED translates "data" current into "data" photons.

The IR receive interface uses a lensed photo diode detector that receives the "data" photons from the transmitter and translates it back into "data" current.

Tx

Rx

Rx

Tx

RS-232 RS-232

IR Interface IR InterfaceInfrared LEDs

Implemented in PC87308

Connected to Header on

motherboard

Page 41: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

41

The Serial Infrared Interface The physical layer is based on the common serial port,

with a few adaptations to reduce the "on" period power requirements (reduces drain on batteries in laptops).The IrDA interface is limited to half-duplex operation due

to interference from the reflected transmit signal.

The physical interface consists of:Encoder / Decoder (IR transmit / IR receive) interfaces

to the UART, commonly on COM2 which can be configured as a normal (modem) port or an IR port.

» Often integrated into “super I/O” chips (e.g. National 87308).

The IR Transducer consists of the output driver and IR emitter for transmitting, and the receiver/detector.

» Often connected to system board front panel I/O header.

Page 42: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

42

The Serial Infrared Interface Testing the infrared signals on the motherboard

(normally COM2), is often accomplished using a “dongle” on the UUT serial port (normally COM1).

» A “dongle” such as the ESI-9680A JETEYE RS232-to-IRDA device manufactured by Extended Systems

The test sets the IR serial port (COM2) and the dongle serial port (COM1) to 115.2 Kbaud & "8N1".

The IR serial port COM2 transmits a sequence of bytes.If the dongle serial port (COM1) receives this sequence

from the IR serial port, the dongle serial port (COM1) then transmits another sequence of bytes.

If the IR serial port (COM2) receives this sequence from dongle serial port (COM1), the test passes.

Page 43: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

43

Modem Overview - Introduction

PersonalComputer

PersonalComputer

Modem Modem

CompressionDecompression

CompressionDecompression

19,200 bps

9600 bps

19,200 bps

A MOdulator/DEModulator converts data bits to sound, so data can be transmitted through an ordinary phone system.

Modems also provide data compression, error recovery, and some telephone services (e.g. dialing).

Page 44: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

44

Modem Overview - Introduction A modem converts digital signals generated by the

computer into analog signals which can be transmitted over a telephone line--and transforms incoming analog signals into their digital equivalents.

Receive Data

Transmit Data

To analog Telephone Lines

Receive Data

Transmit Data

Modem

(DCE)

RS - 232 Serial Data0 = +12Vdc1 = -12Vdc

Serial Port

(DTE)

Microprocessor

Parallel Data

TTL DATA0 = 0Vdc1 = +5Vdc

System Board

UART &

XCVR

Page 45: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

45

Modem Overview - Introduction When the system is transmitting data to another

system:The CPU writes a data byte (8 bits) to the serial port.The serial port serializes the data and converts the TTL

1’s and 0’s to the voltage level understood by the modem (RS-232).

The modem converts the RS-232 1’s and 0’s to audio and sends it over the telephone line to the other computer system.

The UART interrupts the CPU to request another byte.

Continued on next page.

Page 46: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

46

Modem Overview - Introduction When the system is receiving data from another

system:The modem receives the audio data over the telephone

line, demodulates it, and sends the serial bit stream to the UART.

The serial port converts the RS-232 1’s and 0’s to the TTL voltage levels understood by the system.

The UART interrupts the CPU when it has a byte assembled

The CPU jumps to the serial port’s Interrupt Service Routine.

The ISR inputs the data byte and stores it in memory.

Page 47: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

47

Modem Overview - StandardsConsultative Committee on International Telephone and

Telegraph (CCITT) - See App C for more information» Renamed ITU (International Telecommunications Union)

» Also known as the "V dot" standards (e.g V.32). > When a standard is upgraded, it is labeled "bis", which is

French for "2nd" (e.g V.42bis); "ter" would be the 3rd version

Most modems use a standardized set of instructions called the "Hayes (a modem mfg) command set"

> Modems have both a command mode and a data mode.

» The Hayes modem instructions begin with a two character sequence called the "attention character" - the letters “AT”.

> Other characters specifying the command follow the “AT” > e.g. ATDT1234567 - Dial 123-4567 using Tones.> e.g. ATH0 - Hangs up the phone.

Page 48: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

48

Modem Overview - CompressionData compression standards use a variety of statistical

techniques to pack more data into fewer bits.Data compression algorithms exploit redundancies in

data files, especially text files and certain graphics formats, by substituting a few characters for many.

» For example, a repeated string of characters like "AAAAAAAA" can be compressed to something like "A|8" meaning "character 'A' repeated eight times."

» Common letter combinations, such as "the", can be compressed and represented by single characters.

There are two major standards for data compression protocols, MNP5 and CCITT V.42bis

» MNP-5 - approximately 2-to-1 data compression.

» CCITT V.42bis - compresses data to a max 4-to-1 ratio.

Page 49: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

49

Modem Overview - Modulation Methods Low speed modems use FSK (Frequency Shift Keying)

A constant frequency sine wave (called the 'carrier') is shifted to a slightly higher or slightly lower frequency to represent a logic 0 or logic 1, respectively.

Bell-103 Modem originate-mode signal frequencies (300 Baud)

Telephone System Bandwidth

300 30001070Space

2025Space

1270Mark

2225Mark

Frequency(Hz)

Transmit Receive

Serial bit stream

Frequency- shift keying

Page 50: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

50

Modem Overview - Modulation Methods A telephone channel typically has a useful bandwidth

of about 2700 Hz (from 300 to 3000 Hz)Using both an originate carrier and an answer carrier to

simultaneously transmit and receive data, a full duplex modem can send & receive information at the same time.

Rates above 1200 baud use more complex PSK or QAM modulation methods to transmit more information within the standard telephone bandwidth limits.

» PSK (Phase Shift Keying)

» QAM (Quadrature Amplitude Modulation)

» Note: “baud rate” (carrier shifting rate) and the “data rate” (bits per second) are not the same when using PSK/QAM.

Note: See chart in Appendix C for more information on Modem Standards.

Page 51: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

51

Modem Overview - Null Modem Interface

DTE DCETransmitted Data

Received Data2

3

2

3

PC to modem RS-232 interface.

PC Modem

Transmitted Data Transmitted Data

Received Data Received Data

PC #1

2

3

2

3

Computer to computer RS-232 interface mismatch.

DTE DTE

PC #2

Null modem interface

Transmitted Data Transmitted Data

Received Data Received Data2

3

2

3

NullModem

DTE DTE

PC #1 PC #2

Page 52: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

52

Modem Overview - Null Modem Interface When you connect one personal computer to another

without using modems (over a cable connected via the serial-port), you need a "null modem" connection.A null modem cable is different from a normal modem cable in that

the receiving and transmitting pins are reversed.

Function Pin# Pin# Function

Signal Ground 5 5 Signal GroundTransmit Data (out) 3 2 Receive Data (in)Receive Data (in) 2 3 Transmit Data (out)Request to Send (out) 7 1 Data Carrier Detect (in)Clear to Send (in) 8Data Carrier Detect (in) 1 7 Request to Send (out)

8 Clear to Send (in)Data Terminal Ready (out) 4 6 Data Set Ready (in)Data Set Ready (in) 6 4 Data Terminal Ready (out)

Standard Null-Modem Cable - PC/AT to PC/AT (DB-9S to DB-9S)

Page 53: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

53

REVIEW & SUMMARY

UART REGS:OFFSET 0 Tx BFR(WR); Rx BFR(RD)OFFSET 4 MDM CTL REG (MCR)OFFSET 6 MDM STATUS REG (MSR)

1.84 MHzOscillator

Bi-directionalBus

Transceiver

AddressDecodeLogic

Chip Select

Reset

A0

A1

A2

DataD7 - D0

IOR

IOW

IRQ

PC Bus Serial Port RS-232Interface

9-pinConn

UARTReg

P-3

P-4

P-7

P-1

P-9

P-6

P-8

P-2

Tx BFR

MCR-0

MCR-1

MSR-7

MSR-6

MSR-5

MSR-4

Rx BFR

SOUT

DTR

RTS

UART

DCD

RI

DSR

CTS

SIN

XIN

MR

A0

A1

A2

CS2

D7 - D0

RD

WR

INTR

OUT2

+5 +12

T x D

DTR

RTS

DCD

RI

DSR

CTS

R x D

AddrA9 - A3

-12

1.84 MHz derived from 24MHz/13 on PC87306

Page 54: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

54

REVIEW & SUMMARYWE HAVE DISCUSSED THE FOLLOWING:

The primary functions of the UART.Perform the parallel-serial conversion (and vice versa).Inserting or checking the start, stop & parity bits.Provide handshaking signals.Simultaneously transmit & receive serial data.

The addresses used by the serial port.3F8h - 3FFh: BIOS Serial Port 0 - O/S COM1 (DOS)2F8h- COM2; 3E8h- COM3; 2E8h - COM4

Asynchronous Serial Communications data format.Serial frame consists of start, data, parity, & stop bits.8n1 means 8 bits of data, no parity bit, 1 stop bit.

Page 55: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

55

REVIEW & SUMMARY The RS-232C interface standard.

2 classes of devices: PCs are DTE; Modems are DCE. » Signal names are from the viewpoint of the DTE (PC).

Looks upside down: Start Bit (Logical 0) = RS-232 +12V Serial Port registers & input/output signal definitions.

Writing to the Modem Control Reg (Port 3FC) provides control of output signals sent to the connector.

Reading the Modem Status Register (Port 3FE) reports the status of input signals on the connector.

The use of loopbacks for testing serial ports.Some output pins wire connected to some input pins.

» Can be tested without the external loopback by setting Bit 4 of the MCR to place into Internal loopback mode.

Page 56: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

56

REVIEW & SUMMARY Serial port BIOS support.

ROM BIOS uses INT 14h and is very limited.Call INT 14h with AH=0 to initialize the port.

The Serial Infrared interface.The physical layer is based on the common serial port.IR transmit / IR receive commonly on COM2.The IR Transducer connected to front panel I/O header.

Characteristics and features of modems.A MOdulator/DEModulator converts data bits to sound.Modems use FSK, PSK & QAM modulation methods.A "null modem" cable connects one PC to another

without using modems.

End of Chapter 1-1

Page 57: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

57

APPENDIX A: RS-232 SIGNAL DESCRIPTION

A typical Serial Transmit control sequence example:1. The PC (DTE) asserts DTR (Data Terminal Ready) to

indicate that it is active and ready for transmission. 2. The Modem (DCE) responds by asserting the DSR

line (Data Set Ready), indicating that it is also ready for communications.

3. The PC (DTE) asserts the RTS line (Request To Send) to indicate that it is ready to start transmitting.

4. The Modem (DCE) responds by asserting the Clear To Send line, indicating that it is ready to receive data.

5. Data is now transmitted on the TD and RD lines. > Cannot transmit until DTR, DSR, RTS, & CTS =1

6. The PC drops Data Terminal Ready to disconnect.

Page 58: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

58

APPENDIX A: RS-232 SIGNAL DESCRIPTION

TxD (Transmit Data): Output - Pin 3 Serial data is sent from the DTE (PC) to the DCE

(modem, fax, etc)

RD, RxD, Sin (Receive Data): Input - Pin 2 Serial data is sent from the DCE to the DTE (PC).

GND, SG (Signal Ground): Pin 5This is the ground to which all other voltages are relative.

The following control lines each have two states.The high or asserted state indicates that the control

line is active. The low or de-asserted state indicates that the

control line is inactive.

Page 59: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

59

APPENDIX A: RS-232 SIGNAL DESCRIPTION

DTR (Data Terminal Ready): Output - Pin 4 Set to +12v (Control Signal ON) by MCR bit 0 = 1

» e.g. write 01h (0000 0001y) to 3FCh [ITP uses ‘y’ for binary]> Note: This sets DTR# = 0 (from the UART) which is inverted to

+12v by the RS-232 interface circuitry (line driver).

This signal informs the DCE (modem, fax, etc) that the DTE (PC) is powered up and ready to go. The DTE (PC) indicates to the DCE that it is ready to

respond to signals and data from the DCE (modem) . » Can be set to the ON state by the DTE (PC) when a comm

program is loaded and the PC is ready to communicate.

Note that a typical DCE (modem, etc) must have an incoming DTR before it will function normally.

NOTE: Loopbacks typically tie DTR to DSR.

Page 60: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

60

APPENDIX A: RS-232 SIGNAL DESCRIPTION

DSR (Data Set Ready): Input - Pin 6 +12v sets MSR bit 5 = 1 (e.g. read 20h from 3FEh)

This signal informs the DTE (PC) that the DCE (modem, fax, etc) is is powered up and ready to go.DCE indicates that it is available to transmit data.

» Sometimes called “modem ready”.

It is normally set to the ON state by the DCE (modem, fax, etc) upon power-up and left there.

Note that a typical DTE (PC) must have an incoming DSR in order to function normally.

NOTE: Loopbacks typically tie DTR to DSR.

Page 61: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

61

APPENDIX A: RS-232 SIGNAL DESCRIPTION

RTS (Request To Send): Output - Pin 7 Set to +12v by MCR bit 1 = 1 (e.g. write 2 to 3FCh)

Indicates that the DTE (PC) wishes to send data to the DCE (modem, fax, etc)The DTE requests permission to send information on the

TxD line and awaits an ON condition on CTS (Clear to Send) from the DCE (modem, fax, etc),

The DTE must leave this line high throughout the entire transmission sequence.

» Many modems will hang up the phone line when RTS goes low.

NOTE: Loopbacks typically tie RTS to CTS.

Page 62: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

62

APPENDIX A: RS-232 SIGNAL DESCRIPTION

CTS (Clear To Send): Input - Pin 8 +12v sets MSR bit 4 = 1 (e.g. read 10h from 3FEh)

Indicates that the DCE (modem, fax, etc) is ready to accept data from the DTE (PC).The DCE (modem) responds to the RTS signal on the

Clear to Send control line. » The DTE (PC) cannot transmit until CTS is set high.

Note that a typical DTE (PC) must have an incoming CTS before it can transmit.

NOTE: Loopbacks typically tie RTS to CTS.

Page 63: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

63

APPENDIX A: RS-232 SIGNAL DESCRIPTION

DCD (Data Carrier Detect): Input - Pin 1 +12v sets MSR bit 7 = 1 (e.g. read 80h from 3FEh)

This is the signal the DCE (modem, fax, etc) uses to inform the DTE (PC) that it that it has detected a carrier signal.The attached device (Modem) has established a link with

another modem.

Note that some DTEs (PCs) must have an incoming DCD before they will operate.

Page 64: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

64

APPENDIX A: RS-232 SIGNAL DESCRIPTION

RI (Ring Indicator): Input - Pin 9 +12v sets MSR bit 6 = 1 (e.g. read 40h from 3FEh)

The DCE (modem, fax, etc) indicates to the DTE (PC) that the phone line connected to the attached device (modem) is ringing. This line is typically used to tell a modem to answer the

line.

Often used by communications software to automatically answer an incoming call.

Page 65: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

65

APPENDIX B - Serial Port BIOS Support

Call INT 14h with AH=3 to read status from a port.AH = 03h; DX = port number (00h-03h) Return: AH = line status; AL = MODEM statusBit fields for line status:

» 7-timeout; 6-transmit shift register empty; 5-transmit holding register empty; 4-break detected; 3-framing error; 2-parity error; 1-overrun error; 0-receive data ready

Bit fields for modem status:» 7-carrier detect; 6-ring indicator; 5-data set ready; 4-clear

to send; 3-delta carrier detect; 2-trailing edge of ring indicator; 1-delta data set ready; 0-delta clear to send

Call INT 14h with AH=4 for Extended Initialization or AH=5 for Extended Comm Port Control on PS/2 & many later systems.

» Includes initialization at baud rates at 19,200 & 115,200.

Page 66: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

66

APPENDIX C: MODEM STANDARDS

Standard Description (Note: ITU formerly CCITT)

Bell 103J AT&T standard for full duplex modem operation at 300 bps using frequency-shift keying.

Bell 212A AT&T standard for full duplex modem operation at 1200 bps using differential PSK to send two bits baud period at 600 baud.

V.22bis ITU standard for full-duplex modem operation at 2400 bps using quadrature amplitude modulation (QAM) to send four bits per baud period.

V.32 ITU standard for full-duplex synchronous modem operation at 9600 bps to send 4 data bits per baud period at 2400 baud.

V.32bis ITU standard for full-duplex synchronous modem operation at 14,400 bps to send 6 data bits per baud period at 2400 baud.

V.34 ITU standard for full-duplex synchronous modem operation at 28,800 bps to send a variable number of bits per baud period.

V.42 ITU standard for error control of modem data. Data is transmitted in blocks with a cyclic redundancy checksum appended to the end of each block..

V42bis ITU standard for on-the-fly modem data compression. Compression ratios of about 3:1 are typically achieved.

Page 67: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 1.1 - Chapter 1.1 - Interfaces: Serial Port Systems Manufacturing Training and.

67

APPENDIX C: MODEM STANDARDS

Modem Type (BPS) Modulation Asynch/Synch Duplex Mode

Bell 103 300 FSK Asynch Full

Bell 212A 1200 PSK Asynch Full

CCITT V.22 1200 PSK Asynch Full

WE 201A 2400 PSK Synch Half

WE 201B 2400 PSK Synch Full

WE 201C 2400 PSK Synch Full

CCITT V.26 2400 PSK Synch Full

CCITT V.26 bis 2400 PSK Synch Half

CCITT V.26 ter 2400 PSK Synch Full

CCITT V.22 bis 2400 QAM A or S Full

CCITT V.27 4800 PSK Synch Full

CCITT V.27 bis 4800 PSK Synch Half

CCITT V.27 ter 4800 PSK Synch Full

Bell 208A 4800 QAM Synch H or F

Bell 208B 4800 QAM Synch Half

Bell 209A 9600 QAM Synch Full

CCITT V.29 9600 QAM Synch Half

CCITT V.32 9600 QAM A or S Full

CCITT V.33 14,400 QAM Synch Full