Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

Similar documents
Introduction to Computers - Chapter 4

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Introduction to Microcontrollers

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

Embedded Applications. COMP595EA Lecture03 Hardware Architecture

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

Input/Output Modes Chapter 8

3. The MC6802 MICROPROCESSOR

MC68HC12 Parallel I/O

MICROCOMPUTER OPERATION

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Chapter Operation Pinout Operation 35

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

ECE 571 Advanced Microprocessor-Based Design Lecture 3

SECTION 5 RESETS AND INTERRUPTS

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Microprocessors/Microcontrollers

Microcomputer Architecture and Programming

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Microprocessor Architecture. mywbut.com 1

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

8051 Microcontroller

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

EE 3170 Microcontroller Applications

EE 308 Spring Lecture 28 March 30, 2012 Review for Exam 2. Introduction to the MC9S12 Expanded Mode

Summer 2003 Lecture 21 07/15/03

Introduction. ECE/CS 5780/6780: Embedded System Design. Memory-Mapped I/O. Isolated I/O. Expanded Mode. Multiplexed Address and Data Lines

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview

Z Z-280 MT8930, MT8992/3/4/5 MT8880 MT8888 MT8889 MT8980/1 MT8985, MT8986 (DIP-40) MT8986 (PLCC-44) MT8920B MT8952B

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

General Purpose Programmable Peripheral Devices. Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar

Professional Radio GM Series. Controlhead Service Information


Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

Pin Description, Status & Control Signals of 8085 Microprocessor

8085 Microprocessor Architecture and Memory Interfacing. Microprocessor and Microcontroller Interfacing

Address connections Data connections Selection connections

The 9S12 in Expanded Mode - How to get into expanded mode Huang Chapter 14

1. Internal Architecture of 8085 Microprocessor

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

The Memory Component

Basics of Microprocessor

The MC9S12 in Expanded Mode Using MSI logic to build ports Using MSI logic to build an output port Using MSI logic to build an input port

PRINCETON (VON NEUMAN) ARCHITECTURE MICROPROCESSOR

Architecture of 8085 microprocessor

A First Look at Microprocessors

Wed. Aug 23 Announcements

Z8 Pod Adapter. for the. Fluke 9000-Series Troubleshooter

THE MICROCOMPUTER SYSTEM CHAPTER - 2

Lecture-55 System Interface:

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output


QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

Computer Systems Organization

CPE/EE 421 Microcomputers

The 9S12 in Expanded Mode - How to get into expanded mode Huang Chapter 14

Mark II Aiken Relay Calculator

The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14

Segment 1A. Introduction to Microcomputer and Microprocessor

These three counters can be programmed for either binary or BCD count.

Using the MC9S12 in Expanded Mode External Ports S12CPUV2 Reference Manual Multiplexed External Bus Interface (MEBI) Module V3 Block User Guide

UNIT - II PERIPHERAL INTERFACING WITH 8085

HC12 Built-In Hardware

The Itanium Bit Microprocessor Report

EE 3170 Microcontroller Applications

EE251: Thursday November 30

MICROPROCESSOR B.Tech. th ECE

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Moodle WILLINGDON COLLEGE SANGLI (B. SC.-II) Digital Electronics

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

CHAPTER 8. Solutions for Exercises

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

DESIGN, MANUFACTURE AND TESTING OF A 4-BIT MICROPROCESSOR

Lecture-50 Intel 8255A: Programming and Operating Modes

Processing Unit CS206T

EC4205 Microprocessor and Microcontroller

EE251: Tuesday December 4

b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer:

Chapter 8 Summary: The 8086 Microprocessor and its Memory and Input/Output Interface

ASSIGNMENT 4: INTRODUCTION TO THE 68HC11. Out: Monday, Sep 29, 2003 Due Monday, Oct 6, 2003

System Reset / C167. Figure 17-1 External Reset Circuitry. Semiconductor Group 17-1

Memorial University of Newfoundland

commodore semiconductor group NMOS 950 Rittenhouse Rd., Norristown, PA Tel.: 215/ TWX: 510/ (MEMORY, I/O, TIMER ARRAY)

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Examining the complete instruction cycle for one instruction illustrates the operation of the P8 CPU. Assume the following conditions: C C C

ADuC812 MicroConverter Parallel Programming Specification

Allmost all systems contain two main types of memory :

Fig 1. Block diagram of a microcomputer

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

EE 3170 Microcontroller Applications

Microprocessors and Microcontrollers (EE-231)

Transcription:

Microcomputer Structure and Operation Chapter 5 A Microprocessor ( P) contains the controller, ALU and internal registers A Microcomputer ( C) contains a microprocessor, memory (RAM, ROM, etc), input and output units A P and C can deliver an inexpensive (cost and hours) solution to a design problem Custom circuits are generally preferred in areas where very high speed is necessary, but they are very costly 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

Typical Applications A C receives input information or data and executes a sequence of instructions which processes this information and then provides an output A C may control the engine of an automobile and provides feedback via the display panel Many parameters such as temperature, oxygen, fuel, etc provide the information to the algorithms which control the performance of the engine A C may also control an electric oven where information is entered via a keyboard to indicate cooking temperature and time It responds by controlling the burner through an output A temperature sensor provides feedback on the current temperature of the oven so that it can be better controlled 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 2

68HC11 in Expanded Mode 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 3

Microcomputer Architecture The 68HC11 is set in expanded mode by pulling MODA and MODB high This mode allows external memory and I/O devices to be connected directly to the MPU busses Not all the information is shown; still a simple diagram Three busses carry all the information necessary Address (A15-A0) Data (D7-D0) Control (R/W, etc) The MPU is constantly transferring information to and from memory 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 4

Ports A port is a set of pins on the chip through which digital information is transmitted to and from the MPU 68HC11 has 5 ports: A, B, C, D, and E We are only interested in ports B and C for expanded mode 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 5

Ports B and C In expanded mode, port B is an output and port C is bi-directional Port B is used to provide the upper order address information for memory access Port C is a multifunction port depending on the state of E-clock and address strobe (AS) 1. Provides the lower order address information for memory access 2. Provides the data for writing to memory and reads the data from memory while reading Port C is time-multiplexed since it delivers different signals at different times A latch is used to capture the low order address to be used at a later time Additional decoders can be used to allow for different memory types 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 6

Control Bus The control bus synchronizes the operation of the MPU with other elements R/W is set to indicate the direction of data on the data bus AS is high when the information on Port C is the low order address of a memory access /RESET is used to reset the MPU; it can also be initiated by the 68HC11 /XIRQ and /IRQ are interrupt signals that tell the MPU that something important has happened and it must be investigated E is the 68HC11 s E-clock (more on this later) 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 7

Clock Signals 68HC11 uses a single clock signal known as the E-clock both internally and externally The frequency is determined by the external clock components connected to EXTAL and XTAL E-clock is always ¼ this frequency Maximum external clock is 8MHz; maximum internal is 2MHz 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 8

Clock Signals 68HC11 also uses an internal clock PH2 The PC is incremented on the rising edge of PH2 Data is latched into the accumulator on the falling edge of E-clock When E-clock is low, AS goes high and address information is placed on ports B and C PH2 has the same frequency as E-clock but it leads by 90 degrees; they do not overlap Falling edge of E-clock signifies the beginning of a clock cycle 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 9

I/O Interfacing and Ports There can be several I/O devices connected to the bus Cannot be directly connected to the bus; must use interfacing circuitry Interfacing may be required when voltage levels and timing are different Most Cs have many ports, which can be used to interface with other devices 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 10

Read and Write Timing The MPU is constantly performing READ and WRITE operations as it executes a program READ: Fetches the op-code from memory Fetches the operand from memory Fetches the data from memory (LDAA, ADDA, SUBA) WRITE: Transfers data from internal register to memory (STAA) Transfers data from internal register to output device Read operations are more common since they are necessary to read the program instructions 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 11

Everything is in reference to PH2, E-clock and AS 1. Rising edge of AS R/W = 1 Address is set 2. Rising edge of PH2 PC is incremented Read Operations 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 12

Read Operations 3. Falling edge of AS Low order address is fully latched Remove low order address from port C 4. Rising edge of E- clock Enable selected devices (RAM, ROM, I/O) Port C becomes an input 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 13

Read Operations 5. Falling edge of E- clock Data on port C are latched to an internal register Memory must deliver a value within this time When E-clock goes low, external memory is disabled and bus goes to high-z 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 14

Write Operations 1. Rising edge of AS R/W = 0 Address is set 2. Rising edge of PH2 Nothing happens 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 15

Write Operations 3. Falling edge of AS Low order address is fully latched Remove low order address from port C 4. Rising edge of E- clock Enable selected devices (RAM, ROM, I/O) Port C becomes an output Data is placed on port C 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 16

Write Operations 5. Falling edge of E-clock Data on port C is latched into selected memory device Memory must commit this value within this time 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 17

Sample Program for Bus Activity Execute 2 instructions ADDA and STAA Requires 8 cycles Memory Address $C300 $C301 $C302 $C303 $C304 $C305 Contents Mnemonic Description $BB $D7 $5C $B7 $D2 $50 ADDA STAA ADD contents of $D75C to Accumulator A STORE contents of Accumulator A to $D250 $C306?????? Next op-code 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 18

Bus Activity During Program Execution 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 19

Bus Activity During Program Execution Read operation: a. Rising edge of AS MPU places PC/DAR on address bus R/W=1 b. Rising edge of PH2 Increment PC c. Falling edge of AS Low order address is latched d. Rising edge of E-clock Memory device is enabled e. Falling edge of E-clock Latch data word from memory device 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 20

Bus Activity During Program Execution Write operation: a. Rising edge of AS MPU places DAR on address bus R/W=0 b. Rising edge of PH2 Nothing takes place c. Falling edge of AS Low order address is latched d. Rising edge of E-clock Memory device is enabled Output is placed on data bus e. Falling edge of E-clock Latch data word to memory device 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 21

MPU Address Space Allocation When a Read or Write is performed the MPU places an address on the bus The 68HC11 has 65536 (64K) available addresses This can be allocated into different types of memory (RAM, I/O, ROM) Figure on right is an example of what you might find in one of the 68HC11s This could be the memory available in expanded mode 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 22

On-Chip Memory and I/O Various 68HC11s All contain the same number of internal registers, etc Different memory configurations RAM and ROM are generally fixed while I/O can be moved (more on this later) 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 23

On-Chip Memory and I/O Some have a different number of Timers, Serial interfaces, A-to- D converters as well as Pulse Width Modulators Some also operate at different voltages and speeds 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 24

Memory Pages The 64K of memory can be divided into 256 blocks of 256 addresses Each is called a page The upper 8-bits of an address can be referred to as the page number The lower 8-bits of an address can be referred to as the word number Upon startup, we can specify the location of the I/O in the 68HC11 by writing the desired page number to a fixed memory register 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 25

Memory Modules and Address The amount of memory in a C depends on the intended application Once the memory arrangement is decided, an address decoding system must be put in place to enable the particular memories at the right time Generally higherorder memory addresses are used to dictate which memory is in use Decoding 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 26

Microcomputer Decoding Example Create an external circuit to connect to a 68HC11 in expanded mode RAM is usually placed starting at address 0 to take advantage of zero page operations ROM is placed at the highest point since the startup information for the 68HC11 is located between $FFFC and $FFFF I/O is placed at $8000 to simplify decoding circuitry 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 27

RAM Decoding Logic 4K x 8 RAM memory required Use 1K x 8 components Need to use a decoder (74HC138) to determine which $0400 part of $0000-$0FFF is being addressed Use of an inverting input NAND gate for higher order address lines provides FULL address decoding 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 28

RAM Decoding Logic Can use partial address decoding Address lines A14-A12 are not considered for decoding $0000-$0FFF is mirrored to $1000, $2000, $3000, $4000, etc This is acceptable as long as the programmer is aware that these memory addresses are shared 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 29

ROM Decoding Logic 16K x 8 ROM memory required Use 4K x 8 components Need to use a decoder (74HC138) to determine if $C000-$FFFF is addressed Use of an inverter on A15 as well as A14-A12 to determine which 4K page is being used /8000 is used later for I/O 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 30

I/O Decoding Logic A large amount of I/O is usually not necessary In this example, we will only have 8 input and 8 output bits A2 decides on which to enable Writing to $8000 puts data on the output I/O Reading from $8004 reads data from the input I/O $8000 is mirrored to $8001, $8002, $8003, $8008, $8009, etc $8004 is mirrored to $8005, $8006, $8007, $800C, $800D, etc 2003-2017 Roberto Muscedere Images and Text Portions 2003 Prentice Hall 31