Serial Input/Output Interface Outline –Serial I/O –Asynchronous serial I/O –6850 ACIA –68681 DUART –Synchronous serial I/OInterface Standards –68000 Serial.

Slides:



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

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.
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
SCI: Serial Communications Interface Presented by: Sean Kline Chad Smith Jamie Cruce.
Serial I/O - Programmable Communication Interface
1 Fall 2005 Local Serial Asynchronous Communication Qutaibah Malluhi Computer Science and Engineering Qatar University.
COMP3221: Microprocessors and Embedded Systems Lecture 22: Serial Input/Output (II) Lecturer: Hui Wu Session 1, 2005.
Eng. Husam Alzaq The Islamic Uni. Of Gaza
USART and Asynchrono us Communica tion The USART is used for synchronous and asynchronous serial communication. USART = Universal Synchronous/Asynchronous.
Transmission Characteristics 1. Introduction (Information Interchange codes) 2. Asynchronous and Synchronous Transmissions 3. Error detection (bit errors)
CSCI 4550/8556 Computer Networks Comer, Chapter 5: Local Asynchronous Communication (RS-232)
COMP3221: Microprocessors and Embedded Systems
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
William Stallings Data and Computer Communications 7th Edition Chapter 6 Digital Data Communications Techniques.
Data Communications Chapter 6 The Data Communications Interface.
Interface circuits I/O interface consists of the circuitry required to connect an I/O device to a computer bus. Side of the interface which connects to.
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.
Local Asynchronous Communication
Local Asynchronous Communications. Bit-wise data transmission Data transmission requires: Encoding bits as energy Transmitting energy through medium Decoding.
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 Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Transmission Modes Serial Transmission  One bit is transmitted on a circuit at a time  Usually there is one transmit circuit and one receive circuit.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
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),
SC200x Peripherals Broadband Entertainment Division DTV Source Applications July 2001.
Input/Output mechanisms
Lecture Set 9 MCS-51 Serial Port.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
1 Microprocessor-based Systems Course 9 Design of the input/output interfaces (continue)
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
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
Chapter 8 Serial and Parallel Port Interfacing Valvano’s Intro. To Embedded Systems.
Advanced Embedded Systems Design Lecture 8 Serial I/O BAE Fall 2004 Instructor: Marvin Stone Biosystems and Agricultural Engineering Oklahoma.
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
Chapter 5: Local Asynchronous Communication 1. Bit-wise data transmission 2. Asynchronous communication 3. Sending bits with electric current 4. Standard.
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.
NS Training Hardware. Serial Controller - UART.
Universal Asynchronous Receiver/Transmitter (UART)
Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface.
Extended Uart The High Speed Digital Systems Laboratory, Electrical Engineering Faculty, Technion By: Marganit Fina Supervisor: Rivkin Ina Winter 2007/8.
Unit 1 Lecture 4.
1 Business Telecommunications Data and Computer Communications Chapter 6 The Data Communications Interface.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
8251 USART.
BASICS OF SERIAL COMMUNICATIONS BIRLA VISHWKARMA MAHAVIDYALAYA ELECTRONICS & TELECOMMUNICATION DEPARTMENT PRESENTING BY: ABHISHEK SINGH AMANDEEP.
Serial Communications
William Stallings Data and Computer Communications
Serial mode of data transfer
RS-232 Communications.
E3165 DIGITAL ELECTRONIC SYSTEM
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
Serial Communication Interface
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
8051SERIAL PORT PROGRAMMING
PIC Serial Port Interfacing
Serial Communications
William Stallings Data and Computer Communications
Introduction Communication Modes Transmission Modes
Presentation transcript:

Serial Input/Output Interface Outline –Serial I/O –Asynchronous serial I/O –6850 ACIA –68681 DUART –Synchronous serial I/OInterface Standards –68000 Serial I/O Example Goal –Understand serial I/O fundamentals –Understand ACIA and intro to DUART Reading –Microprocessor Systems Design, Clements, Ch. 9

Serial I/O Serial data transmission –serial - bit at a time –cheap, simple, easy to use –asynchronous or synchronous –full or half-duplex –transmission medium - twisted pair, IR, fiber, etc. Serial interface –parallel-to-series, series-to-parallel adaptor –line drivers –plugs and sockets Application –connect CPU to remote peripheral –examples »CRT »temperature sensor

Asynchronous Serial I/O Asynchronous - transmitter and receiver do not synchronize timing –clocks at transmitter and receiver not synchronized –data at each end is synchronized to local clock Data format –developed in days of electromechanical hardware –idle - mark level, logic 1 –start bit - space level, logic 0 –7 or 8 data bits - usually an ASCII character –optional even or odd parity bit –stop bit - logic 1, 1 or 2 bit times in length –12 combinations in total

Data Timing Bit time = T Receiver waits for start bit falling edge –triggers local clock Samples next N bits at their centers –using local clock, compute T/2 Clock precision –< T/2 error in 9-11 bits between transmitter and receiver clocks –< 5% error - trivial with crystal oscillators

Data Formatting Issues Transmitted characters –ASCII 7-bit character set is standard in US –older IBM EBCDIC still exists in a few places –ISO character sets for non-English languages »often 16-bit characters Binary data –often must put 8-bit binary data into 7-bit characters –binhex, uuencode, ZIP, etc. »tricky to include control information Efficiency –7-bit data, start, 1-bit stop, parity => 70% overall efficiency

6850 ACIA 6850 Asynchronous Communications Interface Adaptor (ACIA) –series-parallel data conversion –asynchronous data formatting CPU Side Interface –6850 looks like byte-wide SRAM –accesses synchronized to E enable clock –uses 6800 synchronous bus cycles –3 chip enables –1 register select pin »connect to A01 => registers on word boundaries –IRQ* for autovectored interrupts

ACIA Receiver and Transmitter Receiver –RxD - receiver data input - serial data input –RxCLK - receiver clock »1, 16, or 64 times receiving data rate »the receiving Òbaud rateÓ »baud = transition/second, from Baudot –DCD* - data carrier detect »use with modem, incoming data is valid Transmitter –TxD - transmitter data output - serial data output –TxCLK - transmitter clock »normally same as RxCLK –RTS* - request to send output - ACIA is ready to transmit data »set or cleared by software control –CTS* - clear to send input - modem is ready, has carrier »CTS* negated inhibits transmission

6850 ACIA Operation 6850 registers –control, status, transmit data, receive data –accessed by RS and R/~W pins »transmit and control are write only –note, if RS = A01, use LDS*, register address is odd Transmit data register (TDR) –write data to transmit Receive data register (RDR) –read received data

6850 Operation (cont.) Control register (CR) –define ACIA operating mode –CR1-CR0 - ratio between clock and data rate »11 = chip reset –CR4-CR2 - 7/8 bits, even/odd/no parity, 1/2 stop bits –CR6-CR5 - RTS* state, interrupt enable »interrupt when TDR empty, unless CTS* high »11 - transmit break - logic 0 continuously »usually causes interrupt at receiver –CR7 - enable receiver interrupt when RDR full »also enables interrupt on overrun and DCD* high

6850 Operation (cont.) Status register (SR) –transmit and receive status –SR0 - receiver data register full »if CR7 set, also set SR7 IRQ bit »cleared on data read, reset, or DCD* high –SR1 - transmitter data register empty »cleared on write, reset, CTS* high »if CR7 set, also set SR7 IRQ bit –SR2 - data carrier detect »set if DCD* high, also set SR7 »remain set if DCD* goes low, clear on SR and data read –SR3 - clear to send »value of CTS* input –SR4 - framing error »set if missing stop bit, cleared otherwise »overwritten by each character

6850 Operation (cont.) Status register –SR5 - receiver overrun »set if RDR overwritten by next character before read by CPU, when last bit of next character read »cleared by RDR read or reset –SR6 - parity error »set when parity error in incoming character »cleared when character read –SR7 - interrupt request »set when (SR0 or SR1 or SR2) and CR7 set »IRQ* asserted »clared by RDR read, TDR write, reset

Using the 6850 ACIA Minimal system –no use of RTS*, CTS*, DCD*, no interrupts –only look at SR0-SR1 ACIACEQU$E0001CR/SR addr ACIADEQUACIAC+2TDR/RDR addr RDRFEQU0RDR full TDREEQU1TDR empty INITIALIZEMOVE.B#$F3,ACIACReset ACIA MOVE.B#$19,ACIACNo IRQ, RTS* low, 8-bit data even parity,1 stop bit,16x ck RTS INPUTBTST.B#RDRF,ACIACTest receiver status BEQINPUTPoll until has data MOVE.BACIAD,D0Put data in D0 RTS OUTPUTBTST.B#RDRF,ACIACTest transmitter status BEQOUTPUTPoll until read for data MOVE.BD0,ACIADTransmit the data RTS

68681 DUART Dual universal async receiver/transmitter (DUART) –like pair of 6850s plus baud rate generator »300 to 19,200 baud –full bus interface, vectored interrupts –quadruple buffered input –double-buffered output –6 input, 7 output pins for general-purpose use Multiple modes –normal –automatic echo –local loopback »feed transmitted data to receiver input –remote loopback »feed receiver data to transmitter

Synchronous Serial I/O Synchronous –clocks synchronized over long period of time –high level data link control (HDLC) standard »data packet format Bit synchronization –where do bits shart? –encode timing with data - phase/Manchester encoding Word synchronization –character oriented »transmit two SYN ($16) characters to start message –bit oriented »start/end data block with % open/close flag »use bit stuffing to avoid spurious flag - put 0 after 5th bit in data word, delete at receiver

Serial Interface Standards Need standards for “plug compatibility” RS-232C/D –connect data terminal and communications equipment –electrical and mechanical interface –usually only a subset of pinouts implemented –standard interface chips - line drivers RS-423 –update to RS-232, higher speed, longer cable length RS-422 –differential wire pairs, higher speed, longer cables

68000 Serial I/O Example Dual serial ports –6850 –baud rate generator –1488 line drivers/1489 line receivers Transparent mode –use RTS* to connect receive line of port 1 to transmit line of port 2, and receive line of port 2 to transmit line of port 1 –interface can still monitor incoming data Issues –must set baud rate by switches on board –ACIAs not fully decoded, take $ to $01FFFF –automatically make IRQ4-7 autovectored