Hierarchy of I/O Control Devices

Slides:



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

INPUT-OUTPUT ORGANIZATION
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.
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
SCI: Serial Communications Interface Presented by: Sean Kline Chad Smith Jamie Cruce.
Processor System Architecture
Serial I/O - Programmable Communication Interface
Data Transmission Most digital messages are longer than just a few bits. It is neither practical nor economic to transfer all bits of a long message simultaneously.
Read Chapter 3 (David E. Simon, An Embedded Software Primer)
Transmission Characteristics 1. Introduction (Information Interchange codes) 2. Asynchronous and Synchronous Transmissions 3. Error detection (bit errors)
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Input/Output and Communication
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
1 SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004.
INPUT-OUTPUT ORGANIZATION
University of Tehran 1 Interface Design Serial Communications Omid Fatemi.
Serial Communication ETEC 6416.
The 8051 Microcontroller and Embedded Systems
Input/Output mechanisms
Lecture Set 9 MCS-51 Serial Port.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Universal Asynchronous Receiver/Transmitter (UART)
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 13.
Serial Communications
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 2.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
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.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
The Principle of Electronic Data Serial and Parallel Data Communication Transmission Rate Bandwidth Bit Rate Parity bits.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
AS Computing Data transmission. Basic data transmission Baud The rate that the voltage changes is called the Baud. If the voltage changes 10 times every.
Unit 1 Lecture 4.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
8251 USART.
Chapter Nine: Data Transmission. Introduction Binary data is transmitted by either by serial or parallel methods Data transmission over long distances.
Digital Logic Design Alex Bronstein
Serial Communications
Serial mode of data transfer
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Source: Serial Port Source:
Input/Output and Communication
Diagram of microprocessor interface with IO devices
Serial I/O and Data Communication.
SERIAL PORT PROGRAMMING
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
E3165 DIGITAL ELECTRONIC SYSTEM
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
DIGITAL DATA COMMUNICATION TECHNIQUES
Computer Organization and Design
Source: Serial Port Source:
Serial Communication Interface: Using 8251
8251A UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER
11. Input-Output Organization
UART Protocol Chapter 11 Sepehr Naimi
Data Transmission Most digital messages are longer than just a few bits. It is neither practical nor economical to transfer all bits of a long message.
Serial Communications
Chapter Nine: Data Transmission
Source: Serial Port Source:
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Source: Serial Port Source:
8051SERIAL PORT PROGRAMMING
Serial Communications
Serial Communications
Introduction Communication Modes Transmission Modes
Presentation transcript:

Hierarchy of I/O Control Devices 2 Port (A,B), No Bidirectional HS mode (C) 4 mode timer 8155 I/O + Timer 8253/54 Timer 8255 I/O 2 Port (A,B) A is Bidirectional HS mode (C) Extra controls 6 mode timer 8259 Interrupt controller 8237 DMA controller 8251 Serial I/O USART controller

Outline Parallel Vs Serial Communication Characteristics of serial communication Synchronous/A-synchronous, Simplex/Duplex, Baud rate and Error Correction Introduction to 8251 USART controller

Data Comm: Serial Vs Parallel Data Transmission Parallel Serial Synchronous ASynchronous Serial Cheaper Slower Parallel Faster Data skew Limited to small distances

Serial Communication: How ? Two basic modes of data transmission Parallel to serial Conversion Serial to parallel Conversion Sender 1 001001 1 001001 Receiver Sender 1 001001 1 001001 Receiver 10010011 Serial Transmission Parallel Transmission

Type of Serial Communication Synchronous Sender and receiver must synchronize Done in hardware using phase locked loops (PLLs) Block of data can be sent More efficient : Less overhead than asynchronous transmission Expensive Asynchronous Each byte is encoded for transmission Start and stop bits No need for sender and receiver synchronization

Type of Serial Communication Transmission Gaps Sender Receiver a Data Data Data Asynchronous transmission CLK Sender Receiver Data Data Data Data Data Synchronous transmission

Framing in Asynchronous Character oriented Each character carried start bit and stop bits When No data are being transmitted Receiver stay at logic 1 called mark, logic 0 is Space Framing: Transmission begins with one start bit (low/0) Followed by DATA (8bit) and Stop bits (1 or 2 bits of logic high)

Type of Serial Communication Asynchronous transmission 1 start bit 1 or 2 Stop bit Source data 1 0 0 0 1 1 1 0 LSB MSB Time Start Bit Start Bits 8 bit Data

Simplex and Duplex Transmission Data are transmitted in one directions Example: CPU to printer Duplex Data flow in both direction Half Duplex (Transmission goes on way at a time) Full Duplex (Both ways simultaneously)

Rate of transmission Rate at which bits are transmitted (BAUD) Number of signal changes per second Bit time: how long the Bit stay On or Off Printer, Terminal Baud Adjustable (50-9600) 1200Baud means: Bit stay for 1/1200=0.83ms

Error Check Parity Check Check Sum Cyclic Redundancy Code (CRC) Even parity: When odd numbers of 1 make D7=1 Send Even number of 1 Odd parity: When even number of 1 make D7=1 Send Odd number of 1 Check Sum Used for block of data Sum of all Bytes without carry and 2’s complements Total Sum Result should be Zero Cyclic Redundancy Code (CRC) Synchronous Communication Stream of Data can be represented by Cyclic polynomial that divided by a constant polynomial Reminder to set Bits and Send out as check for error

Steps to be followed : Transmitting Inform RX the start bit, end bits and parity check Convert parallel word into stream of bits Create a transmit word by adding start, end and proper parity bit . Transmit one bit at a time with appropriate time delay using one data line Time delay is determined by the speed of transmission

Steps to be followed : Receiving Recognize bit of transmission Receive serial bits, one bit at a time Dismantle the start bits, end bit, parity bit, Data bits Check the error and recognize the end of transmission Convert serial data bit in to parallel word

Software control Asynchronous I/0 using Microprocessor 8 bit Data to be send Steps: Output a start bit Convert the character to be sent in a stream of serial bits with appropriate delay Add a parity information if needed Output one or two stop bit

Serial Transmission in Software 8 5 Decode CSb Output Port D7 D6 D5 WRb D4 D3 D2 D1 D0

Program/Flow chat to Transmit data serially Output Bit using D0 Start Wait bit time Set up Character bit counter Send start bit Rotate Next bit in D0 Decrement the bit counter Wait bit time Is Last bit ? Get Char in ACC Add parity if necessary Send two stop bit Return

Serial Reception in Software 8 5 Input Port D7 D6 D5 DRb D4 D3 D2 D1 D0 Decode CSb

Flow chart to receive data serially Set up Bit counter Clear register to Save bits Start Wait bit time Read input port Save bit Read out put port Is it bit Start? NO Get ready to next bit Decrement bit counter Is Last bit ? Wait half bit time Is bit Still low ? NO Check parity if necessary Wait for two stop bit Return

8085 Serial I/O lines Serial Input Data (SID) Serial Output Data (SOD) Instruction SIM is necessary to output data Interpretations (ACC contents) D7 D6 D5 D4 D3 D2 D1 D0 SOD SDE (0/1 Dis/Ena SOD) X For interrupts MVI A, 80 ; Set D7 in the ACC=1 RAR ;Set D6 =1 and bring carry into D7 SIM ; output D7

Data transmission Program on SOD Transmit an ASCII Char stored in Register B MVI B ASCIIDatabyte ; get data byte in B MVI C,0BH ; set up counter for 11 bits XRA A ; reset carry to 0 NXTbit: MVI A,80H ;set D7=1 in ACC RAR ;bring Carry in D7 and set D6=1 SIM ;output D7 CALL DELAYBittime ;wait for fixed time (BWT) STC ;set Carry 1 MOV A,B ;Place ASIII car in acc RAR ; place ASCII D0 in Carry ;and shift 1 in D7 MOV B,A ;Save B DCR C JNZ NXTbit RET

Hardware control Serial I/O Programmable chip 8251 Requirement of HW control serial I/O An input/output port are required for interfacing Converts data bits in to Parallel to serial & vice versa Data transfer to be synchronized between I/O USART (Universal Synchronous Asynchronous Receiver and Transmitter )

UART/USART Writing a program compatible with all different serial communication protocols is difficult and it is an inefficient use of microprocessor. UART: Universal Asynchronous Receiver/Transmitter chip. USART: Universal Synchronous/Asynchronous Receiver/Transmitter chip. The microprocessor sends/receives the data to the UART in parallel, while with I/O, the UART transmits/receive data serially. 8251 functions are integrated into standard PC interface chip.

UART / CPU interface UART/USART 8251 USART status (8 bit) xmit/ rcv data (8 bit) serial port UART/USART 8251 USART 8250/16450 UART is a newer version of 8251. 16550 is the latest version UART.

Thanks