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

Similar documents
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

Using MSI Logic To Build An Output Port

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

PRINCETON (VON NEUMAN) ARCHITECTURE MICROPROCESSOR

The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle. Address, Data and Control Buses

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

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

A Simple Parallel Input Port

EE 308 Spring 2011 The MC9S12 in Expanded Mode How to get into expanded mode

MC9S12 has 16 bit address and 16 bit data buses. Not enough pins on MC9S12 to allocate 35 pins for buses and pins for all other functions

EE 308 Spring Lab on IIC Bus

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

Review for Exam III. Analog/Digital Converters. The MC9S12 has two 10-bit successive approximation A/D converters - can be used in 8-bit mode

EE251: Thursday November 15

Summer 2003 Lecture 21 07/15/03

Architecture of 8085 microprocessor

Memory System Design. Outline

Picture of memory. Word FFFFFFFD FFFFFFFE FFFFFFFF

MC68HC12 Parallel I/O

EET2411 DIGITAL ELECTRONICS. A device or electrical circuit used to store a single bit (0 or 1) Ex. FF.

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

MC9S12 Address Space

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

The Memory Component

Allmost all systems contain two main types of memory :

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver )

The 9S12 in Expanded Mode - External Ports Huang Chapter 14

ENGIN 112 Intro to Electrical and Computer Engineering

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

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

UNIT:4 MEMORY ORGANIZATION

Memory and Programmable Logic

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

Unit 5 DOS INTERRPUTS

Memory. Memory Technologies

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

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

Memory & Simple I/O Interfacing

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

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

ECE 485/585 Microprocessor System Design

Random Access Memory (RAM)

Summer 2003 Lecture 18 07/09/03

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

Memorial University of Newfoundland

EE4380 Microprocessor Design Project

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

Lab3: I/O Port Expansion

FIGURE Three EPROMs interfaced to the 8088 microprocessor.

Overview. Memory Classification Read-Only Memory (ROM) Random Access Memory (RAM) Functional Behavior of RAM. Implementing Static RAM

RISC (Reduced Instruction Set Computer)

Lecture XIV 8086 Memory Interface. Wisam I Hasan

MODULE 12 APPLICATIONS OF MEMORY DEVICES:

Microprocessors and Microcontrollers (EE-231)

Address connections Data connections Selection connections

ericssonz LBI-38616B MAINTENANCE MANUAL FOR MTD TM SERIES AND DATA RADIO LOGIC BOARD 19D902151G3 DESCRIPTION CIRCUIT ANALYSIS TABLE OF CONTENTS

Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

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

Interfacing Memory Chips on the 6812 Processor Bus. Student's name & ID: Partner's name & ID: Your Section number / TA's name

Introduction read-only memory random access memory

k -bit address bus n-bit data bus Control lines ( R W, MFC, etc.)

Interfacing External I/O with Rabbit 2000/3000 Designs

Logic and Computer Design Fundamentals. Chapter 8 Memory Basics


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

University of Alexandria Faculty of Engineering Division of Communications & Electronics

Lab3: I/O Port Expansion

Semiconductor Memories: RAMs and ROMs

CHAPTER X MEMORY SYSTEMS

EC 6504 Microprocessor and Microcontroller. Unit II System Bus Structure

Lab 16: Data Busses, Tri-State Outputs and Memory

8 MEMORY INTERFACE. Overview. Program Memory and Data Memory. Figure 8-0. Table 8-0. Listing 8-0.

Chapter 1: Basics of Microprocessor [08 M]

Chapter NINE 8088,80286 MICROPROCESSORS AND ISA BUS

Chapter 5 Internal Memory

Unit DMA CONTROLLER 8257

Ultimate1MB expansion features

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

Computer Organization and Assembly Language (CS-506)

Microprocessor Architecture. mywbut.com 1

5 MEMORY. Overview. Figure 5-0. Table 5-0. Listing 5-0.

Lecture-55 System Interface:

Introduction to general architectures of 8 and 16 bit micro-processor and micro-controllers

I/O Design. Input / Output Instructions. Engineering 4862 Microprocessors. Lecture 23. Cheng Li

Code No: R Set No. 1

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001

Chapter Operation Pinout Operation 35

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver )

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

DESIGN RAM MEMORIES BY USING FLIP-FLOP CIRCUITS

ECE 341. Lecture # 16

Embedded Systems Design: A Unified Hardware/Software Introduction. Outline. Chapter 5 Memory. Introduction. Memory: basic concepts

Embedded Systems Design: A Unified Hardware/Software Introduction. Chapter 5 Memory. Outline. Introduction

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

Problem Set 10 Solutions

Chapter 4 : Microprocessor System

8051 Interfacing: Address Map Generation

8255 Programmable Peripheral Interface Architecture MCT/UNIT III/NARASIMHARAJ/LECTURE NOTES /IV MECH A

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

INTERFACING THE ISCC TO THE AND 8086

Transcription:

The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14 Using MSI Logic To Build An Output Port Many designs use standard MSI logic for microprocessor expansion This provides an inexpensive way to expand microprocessors One MSI device often used in such expansions is a decoder, such as the 74HC138 decoder chip 74HC138 A2 A1 A0 E3 E2 E1 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

When E3 high, E2 and E1 low, one of the outputs of the 74138 will go low A2, A1, A0 determine which output will be low. A2 A1 A0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Output Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Using MSI Logic To Build An Output Port A 74HC138 decoder can be used to select a range of addresses The outputs of the 74HC138 are used to select up to 8 different devices The enable inputs are used to determine when one of the 8 different devices should be selected Because the data part of the memory cycle occurs when E is high, the active high enable input is usually connected to the HCS12 s E clock

The active low enable inputs are usually connected to highest-order address lines (A15 and A14), or to combinational logic which is driven by highest-order address lines The address inputs of the 74HC138 are usually connected to the next highest-order address bits. Sometimes the low-order address input is connected to the R/W line of the HCS12 to allow separate selection of input and output devices For example, A15 and A14 are connected to the active low enable inputs. This means that one of the outputs will be selected only when A15 and A14 are low, or for the address range 0x4000 to 0x7fff A13, A12 and A11 are connected to the three address inputs of the 74HC138. For example, address Y5 will be low when A13 A12 A11 are 1 0 1. Thus Y5 will be select for addresses from 0100100000000000 2 to 0100111111111111 2, or from 0x6800 to 0x6fff The Y5 output may be connected to a device which needs only one address In this case, the device will be accessed with any address from 0x6800 to 0x6fff This is called partial address decoding to save expense, we do not decode all address lines, but only enough to put in the number of devices we need We also need to demultiplex only those address lines we decode, which also saves some expense HCS12 Memory Map (Expanded Mode) 0x0000 0x03FF 0x0400 0x0FFF 0x1000 0x3BFF 0x3C00 0x3FFF 0x4000 0x7FFF 0x8000 0xBFFF 0xC000 0xFFFF REGISTERS EEPROM RAM RAM OPEN BANKED FLASH EEPROM FLASH EEPROM Can map external device into any unused space.

When using Altera for address decoding, can select any desired address. Can map using less expensive chip like 74HC138. 74HC138 A13 A12 A11 E A14 A15 A2 A1 A0 E3 E2 E1 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 0x7800 0x7fff 0x7000 0x77ff 0x6800 0x6fff 0x6000 0x67ff 0x5800 0x5fff 0x5000 0x57ff 0x4800 0x4fff 0x4000 0x47ff Want to select external device when E is high Connect E to E3 Will use A15 and A14 as the other enables. This will divide memory into 1/4 of total A15 A14 Chip enabled? 0 0 0x0000 0x3fff 0 1 0x4000 0x7fff 1 0 0x8000 0xbfff 1 1 0xc000 0xffff

A Simple Output Port We will use some MSI chips to implement a simple output port We will use a 74HC374 chip as our output port this is a chip which has 8 flip-flops We need to demultiplex several of the address lines. We will use another 74HC374 chip to do this We will use a 74AHC138 decoder chip to select the output port. For this example we will select the output port based on output Y7 from the 74AHC138. For the connections shown of the next page, A15 and A14 must be low, and A13, A12 and A11 must be high to select output Y7. Thus, the output port will be selected for addresses in the range 0x7800 to 0x7fff The address port needs to be connected to 8 bits of the address/data bus. We must connect it to either the high (even) byte (AD15-8) or the low (odd) byte (AD7-0). For this example we will connect it to the high byte We need to select the output port only when we write to an even address in the range 0x7800 to 0x7fff. In addition to address Y7 being active (low), the R/W line must be low (to indicate a write) and A0 must be low (to indicate an even address). We will use a 3- input OR gate to do this. Now, a write to any even address between 0x7800 and 0x7fff will write data to the output port 74HC374 Octal D-Type flip-flop, positive edge-trigger, 3-state

Simple output port for the HC12. When address is between 0x7800 and 0x7fff and E is high, Y7 will go low On a write to an even address in this range, CS will go low Data on AD15 8 will be latched into port when CS goes high A Simple Input Port We will design a simple input port in a similar manner We will narrow the range of addresses used by using more high-order address lines to enable the 74AHC138. In the example shown, the address range of a single output is 512 bytes. For the output port example above, the range was 2 kb For an input port we need a tri-state buffer to drive the input data transparent latch (with tri-state outputs) for our buffer In this example we connect the tri-state buffer to the low (odd) data byte To access the chip for odd address, we need to select the chip only when LSTRB is low

Simple input port for the HC12. When address is between 0x4600 and 0x47ff and E is high, Y3 will go low On a read from an odd address in this range, CS will go low Data from the tri state buffer will be driven onto AD7 0 The HC12 will latch the data into internal registers when E goes from high to low A Simple Input-Output Port The next example shows another way to connect the 74HC138 chip to select input and output devices We connect A0 to one of the active low enable inputs. The 74HC138 will select a device only when A0 is low only for even addresses We connect R/W to the low-order address input of the 74HC138 To select Y0, Y2, Y4 or Y6, R/W must be low. Thus, the devices selected by Y0, Y2, Y4 and Y6 are output devices (devices the HCS12 writes to). To select Y1, Y3, Y5 or Y7, R/W must be high. Thus, the devices selected by Y1, Y3, Y5 and Y7 are input devices (devices the HCS12 reads from).