Lecture 15. Modem Controller Register 4310 DTR 0 = Polling Operator 1 = Interrupts Enabled RTS 1 =Self Test 0 =Normal.

Slides:



Advertisements
Similar presentations
Serial Interface Dr. Esam Al_Qaralleh CE Department
Advertisements

Jim Chen ( 14/06/2011 Hytec Electronics Ltd.
Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
1 Homework Reading (linked from my web page) –S and S Extracts –National Semiconductor UART Data Sheet Machine Projects –mp2 due at start of class 12 Labs.
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
1 Homework Reading –Tokheim, Section 13-6 Continue mp1 –Questions? Labs –Continue labs with your assigned section.
Interfacing The Serial/RS-232 Port Hardware Serial Port Registers Programming.
Serial I/O - Programmable Communication Interface
Eng. Husam Alzaq The Islamic Uni. Of Gaza
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
1 The 9-Pin Connector Pin abbreviations (numbers in parentheses are the 25D pin numbers): 1. CD (8) 2. RD (Rx) (3) 3. TD (Tx) (2) 4. DTR (20) 5. SG (Ground)
ECE 371- Unit 11 Introduction to Serial I/O. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND.
1 מעבדה במבוא לתקשורת בהתאם לאמונה שלי שתלמיד שאינו שולט באנגלית לא יכול להתהדר בתואר אקדמי במדעי המחשב, אזי : זה השקף האחרון בעברית שתראו בקורס.
Serial Communication ETEC 6416.
The 8051 Microcontroller and Embedded Systems
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),
Lecture Set 9 MCS-51 Serial Port.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Universal Asynchronous Receiver/Transmitter (UART)
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire conductors)
Serial Communications
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
NS Training Hardware. Serial Controller - UART.
Universal Asynchronous Receiver/Transmitter (UART)
1 Asynchronous voice band modem for IP data protocols overview features.
Extended Uart The High Speed Digital Systems Laboratory, Electrical Engineering Faculty, Technion By: Marganit Fina Supervisor: Rivkin Ina Winter 2007/8.
8051SERIAL PORT PROGRAMMING
Example 1 Program the divisor Latch for 300 baud. Assume Xin=1.8432MHz The Base Address: 0x3F8 0RX_TX / Divisor.low 1IER: Interrupt Enable Reg. / Divisor.high.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
Lecture # 14. RS – 232C Standard Standard for physical dimensions of the connectors. PC (DTE) Modem RS – 232C Cable Connected via serial port (DCE)
Chapter 4 UART Serial Port Programming 1. Serial vs. Parallel Data Transfer 2.
The HCS12 SCI Subsystem A HCS12 device may have one or two serial communication interface. These two SCI interfaces are referred to as SCI0 and SCI1. The.
Chapter 6 Serial Communications
Serial mode of data transfer
UART Serial Port Programming
RS-232 Communications.
Homework Reading Labs Tokheim, Section 13-6 S and S Extracts
Homework Reading Continue mp1 Labs Tokheim, Section 13-6 Questions?
CS-401 Computer Architecture & Assembly Language Programming
Source: Serial Port Source:
Programming the I/O Hardware
Lecture # 13.
Homework Reading (linked from my web page) Machine Projects Labs
SERIAL PORT PROGRAMMING
RS-232 Communications.
Serial Communication: RS-232 (IEEE Standard)
The slides must be understood in Lecture 5
UART Serial Port Programming
Programming the I/O Hardware
UART Serial Port Programming
Serial Communication Interface: Using 8251
8251A UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER
Serial Communication Interface
UART Protocol Chapter 11 Sepehr Naimi
Lecturer: Reza Arjmandi Autumn 2015
Lecture 16.
Преглед Начин функционисања Имплементације
Configuration and Programming
NS Training Hardware.
Communication 1.CD : Carrier Detect 2.RXD : NC 3.TXD : NC
UART PC16550 (Universal Asynchronous Receiver/Transmitter) By Derwyn Hollobaugh
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
EUSART Serial Communication.
Lecture 17.
PIC Serial Port Interfacing
8051SERIAL PORT PROGRAMMING
PIC Serial Port Interfacing
AVR UART The UART, or Universal Asynchronous Receiver Transmitter, provides hardware support for a serial port on AVR processors Signaling is compatible.
Presentation transcript:

Lecture 15

Modem Controller Register 4310 DTR 0 = Polling Operator 1 = Interrupts Enabled RTS 1 =Self Test 0 =Normal

Modem Status Register CD Change in CTS Change in RI Change in CD CTS RI DSR Change in DSR

UART (16550) FIFO QUEUE FIFO buffer on=1 Clear send Buffer =1 Number of Characters Received To Trigger an Interrupt 00 =After Every Character 01 =After 4 Character 10 =After 8 Character 11 =After 14 Character Clear Receiver Buffer =1

Interrupt ID Register (Revisited) Interrupt Triggered =1 Any one of these BEING Set Indicates FIFO is ON. Reasons of Interrupt 00= Change in Modem Line Status 01=THR is Empty 10=Data is ready 11=Error in Data Transmit 1= Interrupt Triggered Because Buffer is not full But other side has stop sending data. (Time OUT)

BIOS support for COM ports: INT# 14H DX = port # 0 for COM1 1 for COM2 etc. Service# 0 = Set communication parameters Service# 01 = Output character Service# 02 = Read in characters Service# 03 = Get port status

Data Length 00 = 5bits 01 = 6bits 10 = 7bits 11 = 8bits # of stop bits 0 = 1 stop bit 1 = 1.5 or 2 stop bit Parity Check 00 = None 01 = Odd 10 = Parity Disable 11 = Even Baud Rate 000 = 110 bauds 001 = 150 bauds 010 = 300 bauds 011 = 600 bauds 100 = 1200 bauds 101 = 2400 bauds 110 = 4800 bauds 111 = 9600 bauds Service # 0 AL =

Data Ready Over run error Parity error Framing error Time Out TSR Empty THR Break Detected AH = Line Status

Change in CTS Change in DSR Change in RI Change in CD CD RI Ready (DSR) Ready to Receive AL = Modem Status

Service # 01 ON ENTRY AL = ASCII character to send ON RETURN AH = Error Code If 7 th bit in AH = 1 = Unsuccessful 0 = Successful Service # 02 ON RETURN AL = ASCII character received AH = Error Code

Modem PC Modem UARTDigital DataAnalog Tel Line UART PC Modem Digital DataAnalog

NULL Modem PC Cable UART

CD 1 RxD 2 TxD 3 DTR 4 GND 5 DSR 6 RTS 7 CTS 8 RI 9 CD 1 RxD 2 TxD 3 DTR 4 GND 5 DSR 6 RTS 7 CTS 8 RI 9 DTR DSR RTS CTS DSR DTR CTS RTS

Example: #include char ch1, ch2; void initialize (int pno) { _AH=0; _AL=0x57; _DX=pno; geninterrupt(0x14); }

char receivechar (int pno) { char ch; _DX = pno; _AH = 2; geninterrupt (0x14); ch = _AL; return ch; }

void sendchar (char ch, int pno) { _DX = pno; _AH = 1; _AL = ch; geninterrupt (0x14); } unsigned int getcomstatus (int pno) { unsigned int temp; _DX = pno; _AH = 03; geninterrupt (0x14); *((char*)(&temp)) = _AL; *(((char*)(&temp)) + 1) = _AH; return temp; }