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

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

Using MSI Logic To Build An Output Port

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

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

A Simple Parallel Input Port

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

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

PRINCETON (VON NEUMAN) ARCHITECTURE MICROPROCESSOR

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

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

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

EE 308 Spring Lab on IIC Bus

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

Summer 2003 Lecture 21 07/15/03

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

Architecture of 8085 microprocessor

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

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

EE251: Thursday November 15

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

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

Picture of memory. Word FFFFFFFD FFFFFFFE FFFFFFFF

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

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

MC68HC12 Parallel I/O

Memory System Design. Outline

Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

Unit DMA CONTROLLER 8257

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

the enters state of the next m/c cycle, As indicated in the fig the HALT f/f is checked in state of the next m/c cycle if it is fount

EE4380 Microprocessor Design Project

Chapter NINE 8088,80286 MICROPROCESSORS AND ISA BUS

Microprocessors and Microcontrollers (EE-231)

Memorial University of Newfoundland

Lab3: I/O Port Expansion

MICROPROCESSOR B.Tech. th ECE

Lecture-55 System Interface:

The Memory Component

ENGIN 112 Intro to Electrical and Computer Engineering

Lecture-50 Intel 8255A: Programming and Operating Modes

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

Microcomputer Architecture and Programming

Memory. Memory Technologies

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


Lecture-15 W-Z: Increment-Decrement Address Latch:

PIO 8255 (cont..) M Krishna kumar MAM/M3/LU9e/V1/2004 1

University of Alexandria Faculty of Engineering Division of Communications & Electronics

EE 3170 Microcontroller Applications

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

Basics of Microprocessor

AN-12. Use Quickswitch Bus Switches to Make Large, Fast Dual Port RAMs. Dual Port RAM. Figure 1. Dual Port RAM in Dual Microprocessor System

Lab3: I/O Port Expansion

Chapter 1: Basics of Microprocessor [08 M]

Memory and Programmable Logic

3. The MC6802 MICROPROCESSOR

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

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

INTERFACING THE ISCC TO THE AND 8086

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

Random Access Memory (RAM)

CHAPTER X MEMORY SYSTEMS

8/26/2010. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to Three Units of 8085

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

12-Dec-11. Gursharan Singh Maninder Kaur. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to 8085

COMP2121: Microprocessors and Interfacing. I/O Devices (I)

Microprocessor Architecture. mywbut.com 1

Chapter 2 Logic Gates and Introduction to Computer Architecture

Allmost all systems contain two main types of memory :

8085 Microprocessor Architecture and Memory Interfacing. Microprocessor and Microcontroller Interfacing

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 8-<1>

EC 6504 Microprocessor and Microcontroller. Unit II System Bus Structure

ECE 485/585 Microprocessor System Design

INTRODUCTION OF MICROPROCESSOR& INTERFACING DEVICES Introduction to Microprocessor Evolutions of Microprocessor

Lecture XIV 8086 Memory Interface. Wisam I Hasan

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Memory & Simple I/O Interfacing

MICROPROCESSOR TECHNOLOGY

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

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

Problem Set 10 Solutions

1. Internal Architecture of 8085 Microprocessor

Unit 5 DOS INTERRPUTS

The 8237 DMA Controller: -

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

The functional block diagram of 8085A is shown in fig.4.1.

Serial versus Parallel Data Transfers

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

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

Lecture-9 Intel 8085 Microprocessor It is a 40-pin DIP(Dual in package) chip, base on NMOS technology, on a single chip of silicon.

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

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

Reference Sheet for C112 Hardware

Infineon HYB39S128160CT M SDRAM Circuit Analysis

Address connections Data connections Selection connections

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

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

Pin Description, Status & Control Signals of 8085 Microprocessor

ECE 571 Advanced Microprocessor-Based Design Lecture 3

Transcription:

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 A Simple Parallel Output Port We want a port which will write 8 bits of data to the outside Such a port is similar to Port A or Port B when all pins are set up as output We need some hardware to latch the output data at the time the MC9S12 puts the data on the data bus We can use a set of 8 D flip-flops to latch the data - The D inputs will be connected to the data bus - The clock to latch the flip-flops should make its low-to-high transition when the MC9S12 has the appropriate data on the bus - The MC9S12 will access the flip-flops by writing to an address. We must assign an address for the flip-flops - We must have hardware to demultiplex the address from the data, and to determine when the MC9S12 is writing to this address

- The 8-bit inputs of the D flip-ops will be connected to 8 bits of the 16-bit address/data bus of the MC9S12 * If the address of the input is even, we need to connect the flip flop inputs to the even (high) byte of the bus, which is connected to AD15-8 (what was Port A) * If the address of the input is odd, we need to connect the flip flop inputs to the odd (low) byte of the bus, which is connected to AD7-0 (what was Port B) - The hardware should latch the data on the high-to-low transition of the E-clock - Our hardware should bring the clock of the flip-flops low when 1. The address of the flip-flops is on the address bus 2. The MC9S12 is writing to this address 3. The MC9S12 is writing the high byte if the address is even, or the low byte if the address is odd 4. E high is high For example, consider an output port at address 0x4001 (an odd address, or low byte):

0x4001 EE 308 Spring 2013

Using Medium-Scale Integration (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 When E3 high, E2 and E1 are low, one of the outputs of the 74138 will go low A2, A1, A0 determine which output will be low. A2 A1 A0 Output 0 0 0 Y0 0 0 1 Y1 0 1 0 Y2 0 1 1 Y3 1 0 0 Y4 1 0 1 Y5 1 1 1 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 MC9S12 s E clock The active low enable inputs are usually connected to highestorder 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 MC9S12 to allow separate selection of input and output devices For example, on the figure on the next page, 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 selected for addresses from 0110100000000000 2 to 0110111111111111 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 0x7fff 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

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. 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 ¼ 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 74AHC374 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 74AHC374 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 low and A14 must be high, 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 Output enable only

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.

EE 308 Spring 2011 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 (when E goes low)

EE 308 Spring 2011 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 highorder address lines to enable the 74AHC138. In the example shown, the address range of a single output is 512 bytes. For the ouput 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 case 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

EE 308 Spring 2011 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

EE 308 Spring 2011 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 ouput devices (devices the MC9S12 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 MC9S12 reads from).

EE 308 Spring 2011