Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture # 14. RS – 232C Standard Standard for physical dimensions of the connectors. PC (DTE) Modem RS – 232C Cable Connected via serial port (DCE)

Similar presentations


Presentation on theme: "Lecture # 14. RS – 232C Standard Standard for physical dimensions of the connectors. PC (DTE) Modem RS – 232C Cable Connected via serial port (DCE)"— Presentation transcript:

1 Lecture # 14

2 RS – 232C Standard Standard for physical dimensions of the connectors. PC (DTE) Modem RS – 232C Cable Connected via serial port (DCE)

3 RS – 232C Connectors and Signals DB25 (25 pin connector) 25 pin connector on PC 1 2 9 7 8 4 5 6 10 11 12 13 3 25 24 23 22 21 20 19 18 17 16 15 14 RI DTR CD GND DSR CTS RTS RD T X D

4 PC MODEM DTEDCE DTR DSR RTS CTS CD RI DTR (SHOULD REMAIN HIGH THROUGH OUT THE SESSION ) CTS (CAN BE USED FOR FLOW CONTROL ) RxD TxD

5 1 2 3 4 5 6 7 8 9 CD R x D T x D D T R G N D RI CTS RTS DSR DB9 Connector

6 UART Internals Receiver Buffer Register Interrupt Enable Register Line Status Register Interrupt ID Register Divisor Latch Register Line Control Register Modem Control Register Modem Status Register Transmitter Holding Register Receiver Shift Register Interrupt to Parity LOGIC R x D Transmit Shift Register T x D 1.CTS 2.DSR 3.CD 4.RI 1.RT 2.DTR

7 Transmitter Holding RegisterTHR0 Receiver DataRBR0 Band Rate Divisor (Low Byte)DLL0 Band Rate Divisor (High Byte)DLM1 Interrupt EnableIER1 FIFO Control RegisterFCR2 Interrupt IDIIR2 Line ControlLCR3 Mode ControlMCR4 Line StatusLSR5 Modem StatusMSR6 Scratch PadSP7 Base +

8 Served Ports in Standard PC BIOS supports 4 UARTS as COM Ports COM1, COM2, COM3, COM4 PortsMemory Address Port Base COM10040:000003F8H COM20040:00022F8H COM30040:00043E8H COM40040:00062E8H

9 Text Dump - d 40:0 0040:0000 F8 03 F8 02 E8 03 E8 02-BC 03 78 03 78 02 C0 9F..........x.x... 0040:0010 23 C8 20 80 02 85 00 20-00 00 34 00 34 00 71 10 #.......4.4.q. 0040:0020 0D 1C 71 10 0D 1C 64 20-20 39 34 05 30 0B 3A 27..q...d 94.0.:' 0040:0030 30 0B 0D 1C 00 00 00 00-00 00 00 00 00 00 00 00 0............... 0040:0040 D8 00 C3 00 00 00 00 00-00 03 50 00 00 10 00 00..........P..... 0040:0050 00 0A 00 00 00 00 00 00-00 00 00 00 00 00 00 00................ 0040:0060 0F 0C 00 D4 03 29 30 00-00 00 00 00 02 C9 0B 00.....)0......... 0040:0070 00 00 00 00 00 00 08 00-14 14 14 14 01 01 01 01................ -q

10 Setting the Baud Rate 1.8432 MHZ=frequency generating by UARTS internally Divisor value loaded in DLL ( Base +0 ) and DLM ( Base +1 ) Baud rate =1.8432 MHZ / (16*Divisor) Divisor = 1, Baud Rate = 115200 Divisor = 0CH, Baud Rate = 9600 Divisor = 180H, Baud Rate = 300

11 Line Control Register 76543210 0 Load THR 1Load Divisor Value Word Length 00 = 5 BITS 01 = 6 BITS 10 = 7 BITS 11 = 8 BITS Length of Stop BITS 0 = one BIT 1 =1-5 for 5 bit Word Parity Check and generation on Parity 0 = odd 1 = Even. Stop Communication =1 Resume Communication =0 Constant Parity 0 =NO constant Parity 1 =Constant Parity 0 if bit 4 =1 1 if bit 4 =0

12 Line Status Register 6543210 Data Ready =1 Over Run Error = 1 Parity Error =1 Stop Communication Signal from Other end =1 TSR is Empty=1 TSR Contain a Byte=0 THR entry =1 THR contains a BYTE =0 Transfer Error (Framing Error)

13 Interrupt Enable Register 3210 Trigger Interrupt On Data Ready =1 Trigger Interrupt On change in Modem Status =1 Trigger Interrupt As soon as THR is empty =1 Trigger Interrupt On line status change =1

14 Interrupt ID Register 210 Trigger Triggered Modem/Line 00 =Change in Modem Status 01 = THR is Empty 10 = Data is Ready 11 =Error in Data


Download ppt "Lecture # 14. RS – 232C Standard Standard for physical dimensions of the connectors. PC (DTE) Modem RS – 232C Cable Connected via serial port (DCE)"

Similar presentations


Ads by Google