CS-401 Computer Architecture & Assembly Language Programming

Slides:



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

Jim Chen ( 14/06/2011 Hytec Electronics Ltd.
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.
Interfacing The Serial/RS-232 Port Hardware Serial Port Registers Programming.
Asynchronous Communication Hardware  Data within a DTE is usually stored and moved in a parallel fashion.  Data sent across the channel is generally.
1 מעבדה במבוא לתקשורת מועבר ע ” י דני סיטרון כל החומר על הקורס ( החומר שיילמד, תרגילים, ציונים, שעות קבלה …) נמצא ב :
PC Modem Control The 8250 UART supplied with the PC supports a limited number of RS-232-C modem functions: The UART can be programmed to interrupt the.
Eng. Husam Alzaq The Islamic Uni. Of Gaza
Electronics and Networks: Dumb things with Wires Week 2: Serial Overview Jonah Brucker-Cohen Matthew Karau Monday 10am - 12pm Trinity College Dublin MSc.
Computer Science 686 Spring 2007 Special Topic: Intel EM64T and VT Extensions.
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 מעבדה במבוא לתקשורת בהתאם לאמונה שלי שתלמיד שאינו שולט באנגלית לא יכול להתהדר בתואר אקדמי במדעי המחשב, אזי : זה השקף האחרון בעברית שתראו בקורס.
University of Tehran 1 Interface Design Serial Communications Omid Fatemi.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
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 7 Universal Asynchronous Receiver/Transmitter (UART) NCHUEE 720A Lab Prof. Jichiang Tsai.
Modems Chapter 17. Basic Knowledge  Modems are little devices to use the telephone to talk to other computers.  Modem is an abbreviation for Modulator/
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
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
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Universal Asynchronous Receiver/Transmitter (UART)
CE-2810 Dr. Mark L. Hornick 1 Using the USART Configuration and Programming.
Interfaces and Synchronization Martin Weiss. EIA 232D Interface Standard u Synonymous with ITU V.24 u Asynchronous interface u Up to 19.2kbps u 50 foot.
2/26: Wide World of Modems Roll call. Video: modem Lecture: step- by-step
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.
8251 USART.
INDEX Introduction System Control Block Vectored Interrupt Controller (VIC) GPIO UART Timers.
BASICS OF SERIAL COMMUNICATIONS BIRLA VISHWKARMA MAHAVIDYALAYA ELECTRONICS & TELECOMMUNICATION DEPARTMENT PRESENTING BY: ABHISHEK SINGH AMANDEEP.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
Lecture 15. Modem Controller Register 4310 DTR 0 = Polling Operator 1 = Interrupts Enabled RTS 1 =Self Test 0 =Normal.
NARNARAYAN SHASTRI INSTITUTE OF TECHNOLOGY Prepared by: Wasu Ichcha kaur H Bhalani Nidhi M Dhakate Megha D MICROCONTROLLER.
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.
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?
Programming the I/O Hardware
Homework Reading (linked from my web page) Machine Projects Labs
SERIAL PORT PROGRAMMING
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
RS-232 Communications.
CS-401 Compute Architecture & Assembly Language Programming
Serial Communication: RS-232 (IEEE Standard)
Computer Organization and Design
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
Преглед Начин функционисања Имплементације
Configuration and Programming
NS Training Hardware.
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.
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:

CS-401 Computer Architecture & Assembly Language Programming Lecture-38 Serial Port Programming

Serial Port

Serial Port Connector 1 – Carrier Detect (CD) 2 – Received Data (RD) 3 – Transmitted Data (TD) 4 – Data Terminal Ready (DTR) 5 – Signal Ground 6 – Data Set Ready (DSR) 7 – Request to Send (RTS) 8 – Clear to Send (CTS) 9 – Ring Indicator (RI)

Frame Format data bits (5-8) Start bit (1) parity bit (1) Stop bits (1-2)

Connection Diagram TD RD Ground TD RD Ground

Transmission setting

int 0x14 Serial Initialize Port AH = 0x00 AL = port parameters DX = port number (0x00 – 0x03) Return AH = line status Al = modem status

Port Parameters - AL baud rate 000-110 001-150 010-300 011-600 7 6 5 4 3 2 1 baud rate 000-110 001-150 010-300 011-600 100-1200 101-2400 110-4800 111-9600 parity 00-N 10-N 01-O 11-E data bits 00-5 01-6 10-7 11-8 stop bits 0-1 1-2

Write Character to Port int 0x14 Serial Write Character to Port AH = 0x01 AL = character DX = port number (0x00 – 0x03) Return AH (bit 7)= set on error AH (bits 0-6)= port status

Read Character from Port int 0x14 Serial Read Character from Port AH = 0x02 AL = character DX = port number (0x00 – 0x03) Return AH = line status AL = received character (AH bit 7 clear)

int 0x14 Serial Get Port Status AH = 0x03 AL = character DX = port number (0x00 – 0x03) Return AH = line status AL = modem status

Line Status 7 6 5 4 3 2 1 0 rx ready time out tx shift register empty 7 6 5 4 3 2 1 0 time out rx ready tx shift register empty over run tx holding register empty parity error break detect framing error

Serial Ports IO ports

Serial Port I/O Ports COM1: 0x03F8-0x03FF COM2: 0x02F8-0x02FF

Serial Port I/O Ports Port 0x3F8/0x2F8 Transmit Holding Register (THR) Receiver Buffer Register (RBR)

Serial Port I/O Ports Port 0x3F9/0x2F9 Interrupt Enable Register (IER) Bit 0 = Received Data Available Bit 1 = Transmitter Holding Register Empty

Interrupt Identification Register Serial Port I/O Ports Port 0x3FA/0x2FA Interrupt Identification Register Bit 0 = Interrupt Pending Status (0) Interrupt Pending (1) Interrupt Not Pending Bit 1-3 = Pending Interrupt Source (001) THR Empty (010) Received a Character

Serial Port I/O Ports Port 0x3FB/0x2FB Line Control Register (LCR) 7 6 5 4 3 2 1 0 DLAB data bits set break enable stop bit parity

Serial Port I/O Ports Port 0x3FD/0x2FD Line Status Register (LCR) 7 6 5 4 3 2 1 0 reserved data ready tx shift register empty over run tx holding register empty parity error break detect framing error