ECE 353 Introduction to Microprocessor Systems Discussion 13.

Slides:



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

I/O Organization popo.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
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.
William Stallings Data and Computer Communications 7th Edition
The Data Link Layer Chapter 3. Data Link Layer Design Issues Services Provided to the Network Layer Framing Error Control Flow Control.
Serial I/O - Programmable Communication Interface
Hierarchy of I/O Control Devices
COMP3221: Microprocessors and Embedded Systems Lecture 22: Serial Input/Output (II) Lecturer: Hui Wu Session 1, 2005.
1 Chapter Four Making Connections. 2 Introduction Connecting peripheral devices to a computer has, in the past, been a fairly challenging task Newer interfaces.
Chapter 6: Errors, Error Detection, and Error Control
Transmission Characteristics 1. Introduction (Information Interchange codes) 2. Asynchronous and Synchronous Transmissions 3. Error detection (bit errors)
Chapter 6 Errors, Error Detection, and Error Control
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 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.
Unit-5 CO-MPI autonomous
Slide 1 / 20 Industrial Automation - Custumer View - Services PhW - Modbus_en 06/ 2002 Modbus training.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
INPUT-OUTPUT ORGANIZATION
Net 222: Communications and networks fundamentals (Practical Part)
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
USART Communication using the RS standard ETEC6416.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
CHAPTER 5 I/O PRINCIPLE Understand the principles of System Bus
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 13.
ECE 353 Introduction to Microprocessor Systems Discussion 11.
Communication methods
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
Data and Computer Communications
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.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
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.
FUNDAMENTALS OF NETWORKING
Unit 1 Lecture 4.
IT3002 Computer Architecture
FIT1005 FIT – Monash University
© N. Ganesan, Ph.D., All rights reserved. Chapter Formatting of Data for Transmission.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 6 – Digital Data Communications Techniques.
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.
Chapter Nine: Data Transmission. Introduction Binary data is transmitted by either by serial or parallel methods Data transmission over long distances.
Data Transmission and Networks Transmission error checking & correcting.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
SCI Communication Proudly Presented By: Adam Cardi & Aaron Enes.
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.
Types of format of data transfer
Serial mode of data transfer
Input/Output and Communication
Operating Systems (CS 340 D)
I/O Memory Interface Topics:
Serial I/O and Data Communication.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
E3165 DIGITAL ELECTRONIC SYSTEM
Computer Organization and Design
DIGITAL DATA COMMUNICATION TECHNIQUES
Asynchronous Serial Communications
DIGITAL DATA COMMUNICATION TECHNIQUES
Chapter Nine: Data Transmission
Error Detection and Correction
Introduction Communication Modes Transmission Modes
Presentation transcript:

ECE 353 Introduction to Microprocessor Systems Discussion 13

Topics Serial I/O Q&A

Problem Write a serial receive procedure, receive, that receives a 10-bit frame with even parity. The procedure returns the ASCII character in R0, and parity error status in R1 (0 = no error, 1 = parity error). Assume that two delay procedures are available, half_bit_time and one_bit_time. Also, assume that there is a 1 bit data port defined as INPUT, where you read the incoming data on D0.

Answer We will assume Asynchronous Serial Protocol A 10-bit frame will include: A one-bit start bit: 0 A 7-bit pattern – sent LSB first A parity bit – optional, used in this problem (The problem itself states the parity will be fixed, thus we will need the parity bit!) A one-bit stop bit : 1. Things to keep in mind: Is there a way to distinguish noise from an actual start bit? When is the best time to read the input to avoid errors due to noise or signal fluctuations or timing variations between receiver and transmitter?

Solution code “skeleton” receive PUSH{R2-R5, LR};context save LDRR2, =INPUT MOVR0, #0 MOVR1, #0 MOVR4, #0;keep track of parity MOVR5, #8;loop count - read bits poll_for_start get_bits parity_error frame_error done POP{R2-R5, PC};context restore/return END

Answer First, we will check for an actual start bit poll_for_start LDRR3, [R2];read data port ANDSR3, R3, #1;test D0 BNEpoll_for_start;still a 1 - check again BLhalf_bit_time;delay 1/2 bit time and ;check again LDRR3, [R2];read data port ANDSR3, R3, #1;test D0 BNEpoll_for_start;not still 0, keep polling

Answer Then, we de-serialize the pattern set get_bits BLone_bit_time;delay 1 bit time and get ;bit LSRR0, #1;prep for next bit LDRR3, [R2];read data port ANDSR3, R3, #1;test D0 ORRNER0, R0, #0x80;put bit in result ADDNER4, R4, #1;count 1 bits for parity calc. SUBSR5, R5, #1;decrement loop count BNEget_bits;loop til count = 0

Answer Check for frame error, check parity, return result, handle error in frame ;check for frame error BLone_bit_time;delay 1 bit time and get bit LDRR3, [R2];read data port ANDSR3, R3, #1;test D0 BEQframe_error;framing error parity_error ANDSR4, R4, #1;if D0 in R4=1, error, odd # bits MOVNER1, #1;set parity error for return BICR0, R0, #0x80;clear bit7 – just want data bits Bdone frame_error BLframe_err_proc;frame error - go to error handler done

RS-485 Differential transmission Transceivers usually have separate enables for transmit and receive – allows creation of a multi-drop bus Longer distances possible than with RS- 232 (roughly 4000 feet at 64K)

RS-485

Need a protocol to prevent bus contention – only one transmitter on at a time Master/Slave Token passing Bus turnaround speed is an issue – after completing a transmission, must disable the transmitter before another device enables its transmitter to send a reply or initiate a different transaction Overhead associated with a bus – must deal with traffic not meant for you – takes cpu time

Questions?