CSE2102 Digital Design II - Topics CSE2102 - Digital Design II



Similar documents
Chapter 2 Logic Gates and Introduction to Computer Architecture

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Microprocessor & Assembly Language

Lecture N -1- PHYS Microcontrollers

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Serial Communications

MICROPROCESSOR AND MICROCOMPUTER BASICS

Microtronics technologies Mobile:

Memory unit. 2 k words. n bits per word

Computer Organization & Architecture Lecture #19

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

MACHINE ARCHITECTURE & LANGUAGE

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

PART B QUESTIONS AND ANSWERS UNIT I

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

Chapter 1 Computer System Overview

Application Note 132. Introduction. Voice Video and Data Communications using a 2-Port Switch and Generic Bus Interface KSZ MQL/MVL

8741A UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER

Chapter 13. PIC Family Microcontroller

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

Memory Basics. SRAM/DRAM Basics

Building Blocks for PRU Development

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

8051 hardware summary

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

Read this before starting!

PowerPC Microprocessor Clock Modes

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

OpenSPARC T1 Processor

Teaching Systems Integration In An Advanced Microprocessor Applications Course

Software engineering for real-time systems

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Types Of Operating Systems

Chapter 11 I/O Management and Disk Scheduling

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin

Portable adapter for barcode scanners

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

A N. O N Output/Input-output connection

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Computer Systems Structure Main Memory Organization

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

8254 PROGRAMMABLE INTERVAL TIMER

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

DS12885, DS12885Q, DS12885T. Real Time Clock FEATURES PIN ASSIGNMENT

Z80 Microprocessors Z80 CPU. User Manual UM Copyright 2014 Zilog, Inc. All rights reserved.

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Computer Systems Structure Input/Output

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

INPUT/OUTPUT ORGANIZATION

Central Processing Unit

DAC Digital To Analog Converter

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Switch Fabric Implementation Using Shared Memory

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

COMPUTER ARCHITECTURE. Input/Output

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

Central Processing Unit (CPU)

LCM NHD-12032BZ-FSW-GBW. User s Guide. (Liquid Crystal Display Graphic Module) RoHS Compliant. For product support, contact

HANDLING SUSPEND MODE ON A USB MOUSE

EXERCISES OF FUNDAMENTALS OF COMPUTER TECHNOLOGY UNIT 5. MEMORY SYSTEM

Am186ER/Am188ER AMD Continues 16-bit Innovation

Computer and Set of Robots

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

SafeSPI - Serial Peripheral Interface for Automotive Safety

Programming Logic controllers

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

7a. System-on-chip design and prototyping platforms

Operating Systems. Lecture 03. February 11, 2013

An Introduction to MPLAB Integrated Development Environment

Section 29. Real-Time Clock and Calendar (RTCC)

1. Computer System Structure and Components

DS Wire Digital Thermometer and Thermostat

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

STEPPER MOTOR SPEED AND POSITION CONTROL

DS Real Time Clock FEATURES PIN ASSIGNMENT PIN DESCRIPTION

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Computer Engineering

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

Handout 17. by Dr Sheikh Sharif Iqbal. Memory Unit and Read Only Memories

Microcontroller Basics A microcontroller is a small, low-cost computer-on-a-chip which usually includes:

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Introduction to Microcontrollers

Transcription:

CSE2102 Digital Design II - Topics CSE2102 - Digital Design II 6 - Microprocessor Interfacing - Memory and Peripheral Dr. Tim Ferguson, Monash University. AUSTRALIA. Tel: +61-3-99053227 FAX: +61-3-99053574 E-Mail: timf@csse.monash.edu.au WWW: http://www.csse.monash.edu.au/ timf/ Clayton Office: Building 63, Room G08 1. Hardware Design of a Simple CPU. 2. Microprogrammed Implementation of Controller ASM. 3. Numerical Representation and Algorithms. 4. Multiplication and Multiplier Design. 5. VHDL for Digital System Design and Description. 6. Microprocessor Interfacing - Memory and Peripheral. 7. Introduction to Microcontroller and the MC68HC11 High Performance MCU. 8. Revision. Memory and peripheral interfacing is an important topic in practical applications of microprocessor systems. This topic introduces some general concepts in terms of memory and peripheral device interfacing. Note: These slides are based on a set created by Dr. Bin Qiu. 2 The discussion is mainly concerned with the hardware aspects. 6.1 Memory Interface 6.1.1 Analysis of access timing Timing relationship diagrams are normally given in the data sheet of a memory or microprocessor device. The following is an example of a timing diagram. For a more practical case study, we have a close look at the timing diagrams of the Motorola MC68HC11 processor, and a Motorola memory device, MCM65116-20. We focus on whether or not these two chips can be made to interface with one another. The microprocessor/controller has 8/16 bit data/address. The data bus is multiplexed with the lower 8 bit of the address bus. The clock cycle is about 500ns and there is a single R/W control line. The memory chip has 2K 8 bits, and its access time is 200ns. It seems that the memory chip can provide a satisfactory service to the microprocessor since it has a faster access time. The result is different after the examination of timing diagrams. CPU Memory CPU Memory Write cycle timing Read cycle timing 3 Figure 1: Example timing diagram. During a write cycle, the CPU should give the memory enough time to latch the data, and vise versa during the read cycle. 4

Write timing E - Bus clock (1/4 crystal) RW - Read/Write line A - Address D - Data AS - Address strobe The easiest way to arrange the signals are as follows: a) The E clock signal is inverted to serve as CE - latch on rising edge. b) The write enable signal W can be made using CE and RW. (a) MC68HC11 (b) MCM65116-20 5 Figure 2: Write cycle timing diagram. As a result, the write timing interface is OK. 6 Read timing With signal arrangements the same as write timing, the read timing analysis goes as follows: 7 (a) MC68HC11 (b) MCM65116-20 Figure 3: Read cycle timing diagram. 8 It can be seen from Figure 3 that both the setup and the hold time required by the MC68HC11 is not provided by the MCM65116. As a result, the read timing is not up to the specifications. The problem can be solved by selecting different chips for interfacing or redesign signals such as CE.

9 6.1.2 Memory address decoding In a microcomputer system, the entire memory range is normally divided into different zones which represent RAM, ROM, I/O devices, etc. A 16-bit example is shown below, with 4Kb RAM, 16Kb ROM and 4Kb input/output address space. Depending on the usage of the address space, decoding schemes can be broadly classified as full decoding and partial decoding. Every single memory address is decoded in full decoding, resulting in a one address to one memory location mapping. In partial decoding, some address lines are not decoded, resulting in two or many addresses to one memory location mapping. Partial decoding reduces demands on decoding devices. A 16-bit example memory map Using the previous address space, an example decoding scheme with 4 modules of RAM and ROM, and a single I/O port is given as follows: 10 RAM decoding: 4 modules of 1Kx8 bits. The address for each module is given as: M-0: 0000-03FF, M-1: 0400-07FF, M-2: 0800-0BFF, and M-3: 0C00-0FFF The decoding diagram is given on slide 11. ROM decoding: 4 modules of 4Kx8 bits. The address for each module is given as: M-0: C000-CFFF, M-1: D000-DFFF, M-2: E000-EFFF, M-3: F000-FFFF The decoding diagram is given on slide 12. The single I/O port is decoded with the highest four address bits and A2 only, just to distinguish it from the other address zones. Input port: 1000xxxxxxxxx1xx (A15-A0) Output port: 1000xxxxxxxxx0xx (A15-A0) E.g.: Read from 8004, 8005, 8FF4, 8xx4, etc. This is shown on slide 13. 11 12

6.2 Input/Output Device Interface Input/Output devices can work in four general modes as illustrated below. MPU Initiated Device Initiated Unconditional transfer Conditional Interrupt Direct memory transfer * transfer * access (DMA) * Requires some exchanging of control device information between MCU and device (handshaking). 6.2.1 CPU initiated, unconditional I/O transfer The I/O device is always assumed to be ready. Examples are LED displays as outputs and temperature sensors as inputs. 6.2.2 CPU initiated, conditional (polled) I/O transfer 13 The CPU reads I/O status to determine whether the device is ready for data transfer. A flow chart on the next page shows the sequence of steps involved in a polled I/O data transfer. 14 As an example, an external A/D converter is connected to a CPU using polled data transfer as shown on slide 16. The steps for data transfer are as follows: 1. The CPU issues a START pulse to begin the conversion of V A to its digital equivalent. 2. The CPU continually reads and tests the status of the A/D converter by polling, until BUSY is high. 3. The CPU reads in the A/D output data. 15 16

6.2.3 I/O device initiated, interrupt transfer This is more efficient in terms of CPU time: The CPU serves I/O only when it is ready. The following points need to be noted for interrupt I/O transfer. 1. The main program needs to be paused and all parameters stacked. 2. The entrance address (vector) of the service routine can be fixed by the CPU or provided by the I/O device. 3. Interrupts can be software maskable or non-maskable, normally both exist in a system. 4. The handling of multiple interrupt sources can be dealt with by arranging priority of interrupts, or interrupt interrogation as illustrated below: 17 18 19 6.2.4 I/O device initiated, direct memory access (DMA) transfer The previous interface techniques work well on slower I/O devices. DMA is suitable for bulk data transfer from internal memory to external fast I/O, or vise versa. The CPU is bypassed for DMA, when a DMA controller takes over control. Data can be moved between I/O and memory at a rate of one word per memory cycle. The steps of DMA are described as follows: The CPU initialises the DMA controller with a destination address and a count of the words that are to be transfered. When a peripheral is ready, it requests the DMA controller which halts the CPU. The CPU acknowledges its halted state after deactivating all bus lines. The DMA controller takes over the bus lines and transfers the specified amount of data from the peripheral to the specified memory address (i.e. a DMA transfer). The CPU is removed from the halted state on completion of the data transfer and regains the control of system buses. 20