Presentation is loading. Please wait.

Presentation is loading. Please wait.

Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),

Similar presentations


Presentation on theme: "Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),"— Presentation transcript:

1 Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE), e.g. a modem, Data Terminal Equipment (DTE), e.g. the computer. Serial Ports on newer PCs use the D-Type 9 pin male connector, while those on older PCs used the D-Type 25 pin male connector.

2 Serial Port I/O Addresses Typical settings of serial communication (COM) ports: COM Port AddressIRQ COM1 3F8 4 COM2 2F8 3 COM3 3E8 4 COM4 2E8 3 On most PCs, only 2 serial ports can be used at the same time. (Port 1=COM1 or COM3, Port 2=COM2 or COM4)

3 Serial Port pin-out (older)(newer) D25 Port D9 Port Signal Full Name Pin 2 Pin 3 TD Transmit Data Pin 3 Pin 2 RD Receive Data Pin 4 Pin 7 RTS Request To Send Pin 5 Pin 8 CTS Clear To Send Pin 6 Pin 6 DSR Data Set Ready Pin 7 Pin 5 SG Signal Ground Pin 8 Pin 1 CD Carrier Detect Pin 20 Pin 4 DTR Data Terminal Ready Pin 22 Pin 9 RI Ring Indicator

4 PC-to-PC Serial link When 2 PCs are connected by their serial ports, a Null Modem cable is required. It uses only 3 wires (TD, RD & SG) to link up the 2 PCs. TD is wired to RD, and RD is wired to TD from one PC to the other PC. On both sides, DTR, DSR and CD are wired together, so are RTS and CTS. Null Modem Cable

5 The RS232C serial port transmits a "Mark" (logic 1) as -3V to -25V and a "Space" (logic 0) as +3V to +25V. At the receiving end, these voltages are converted to TTL levels: 5V for logic 1 and 0V for logic 0. The serial line is at logic 1 when idle. A serial character begins with a Start bit (logic 0) followed by 7 or 8 Data bits. A Parity bit may optionally be appended. A Stop Bit (logic 1) is added at the end.

6 Typical serial format: 8 Data bits, No Parity, 1 Stop Bit. Serial Communication Speed in bits per second (bps): 1200, 2400, 9600, 19200, 38400, 57600, 115200 bps Serial port communication is handled by an IC chip called a UART (Universal Asynchronous Receiver / Transmitter). The serial port has many registers: Line Control Register, Line Status Register, Transmit Buffer, Receive Buffer, etc. The PC has built-in BIOS routines that help us to handle serial port communication using interrupt services.


Download ppt "Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),"

Similar presentations


Ads by Google