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

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

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 Lab on IIC Bus

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

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

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

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

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

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

MC68HC12 Parallel I/O

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

Review for Exam 3. Write 0x05 to ATD0CTL4 to set at fastest conversion speed and 10-bit conversions

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

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

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

Architecture of 8085 microprocessor

1. Internal Architecture of 8085 Microprocessor

A Simple Parallel Input Port

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.

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

Microcontrollers. Microcontroller

A B C D E F 0480 FE B F5 3B FC F3 E 1A 1D 2A 2D 3A 3D 4A 4D 5A 5D 6A 6D 7A 7D

INTERFACING THE ISCC TO THE AND 8086

MC9S12 Address Space

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

Need more memory! What do we do if our 2K of SRAM isn t enough? Doing complex DSP calculations Large matrix math

Allmost all systems contain two main types of memory :

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

Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

CHALMERS Lindholmen 1. Compare (a) a sand hour glass, (b) a pocket mechanical watch (c) a wrist quartz watch and (d) the Big

Microcomputer Architecture and Programming

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

Chapter 1: Basics of Microprocessor [08 M]

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.

Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access

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

MICROPROCESSOR TECHNOLOGY

INTERFACING INTERFACING. Richa Upadhyay Prabhu. February 29, 2016

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

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

3. The MC6802 MICROPROCESSOR

Introduction to Microcontrollers

Introduction to Computers - Chapter 4

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

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

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

Lecture 25 March 23, 2012 Introduction to Serial Communications

Pin Description, Status & Control Signals of 8085 Microprocessor

EE414 Embedded Systems Ch 5. Memory Part 2/2

Introduction to the MC9S12 Hardware Subsystems

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

EE4380 Microprocessor Design Project

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

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

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

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

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

EE251: Thursday November 15

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Microprocessor & Interfacing Lecture DMA Controller--1

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

Basics of Microprocessor

1. Internal Architecture of 8085 Microprocessor

PIN DIAGRAM. Richa Upadhyay Prabhu. NMIMS s MPSTME January 19, 2016

Mark II Aiken Relay Calculator

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

EE 308 Spring A software delay

FINALTERM EXAMINATION Fall 2008 CS501- Advance Computer Architecture (Session - 1) Marks: 75

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES

Microprocessors/Microcontrollers

Lecture-55 System Interface:

Interfacing GSI Sync SRAMs to a Freescale Multiplexed MPC567xF or PXR40xx Microcontroller

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

ELE 3230 Microprocessors and Computer Systems

8051 Microcontrollers

Three-box Model: These three boxes need interconnecting (usually done by wiring known as a bus. 1. Processor CPU e.g. Pentium 4 2.

Chapter NINE 8088,80286 MICROPROCESSORS AND ISA BUS

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

Read and Write Cycles

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

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

Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored.

Input and Output Ports. How do you get data into a computer from the outside?

Computer Organization and Microprocessors SYLLABUS CHAPTER - 1 : BASIC STRUCTURE OF COMPUTERS CHAPTER - 3 : THE MEMORY SYSTEM

HC12 Built-In Hardware

Handout 15. by Dr Sheikh Sharif Iqbal. Memory Interface of 8088 and 8086 processors

The 8255A: Programmable Peripheral Interface

Address connections Data connections Selection connections

ORCA Series 3 Microprocessor Interface

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

Chapter TEN. Memory and Memory Interfacing

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram

History and Basic Processor Architecture

Transcription:

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

- Computer with N bit address bus can access 2 N bytes of data - Computer with M bit data bus can access M bits of data in one memory cycle - Value on address bus tells memory which location computer wants to read (write) - Control lines tell memory when computer wants to read (write) data, and if access is read or write

Address, Data and Control Buses A microprocessor system uses address, data and control buses to communicate with external memory and memory-mapped peripherals The address bus determines which memory location to access The control bus specifies whether the memory cycle is a read (into microprocessor) or a write cycle (out of microprocessor), and specifies timing information for the cycle The data bus contains the data being transferred during the memory cycle For example, consider the following simple MC9S12 program, which continuously increments the contents of address 0x0400: org 0x2000 loop:inc 0x0400 bra loop The program is stored in memory starting at memory location 0x2000 The MC9S12 Program Counter starts at address 0x2000 The MC9S12 reads the first instruction, inc 0x0400, located in address 0x2000 through 0x2002

The MC9S12 then reads the contents of memory location 0x0400, takes an internal memory cycle to increment the value, then writes the new value out to address 0x0400 The MC9S12 then reads the next instruction, bra 0x2000 The MC9S12 takes one memory cycle to load the program counter with the new value of 0x2000, and to clear its internal pipeline, then reads the instruction at 0x2000 to figure out what to do next

The MC9S12 address, data and control buses Note: The following diagram assumes that the MC9S12 accesses one byte at a time The MC9S12 actually accesses two bytes (16 bits) at a time, when it can What actually occurs on the MC9S12 bus is a little more complicated than what is shown below

The MC9S12 Memory Map MC9S12 has 16 bit address bus can access 65536 bytes 1024 bytes = 1 kb 65536 bytes = 64 kb MC9S12 has 16 bit data bus can access 16 bits (2 bytes) at a time For example, the instruction LDX $0900 will read the two bytes at address $0900 and $0901 Sometimes MC9S12 only accesses one byte e.g., LDAA $0900 The MC9S12 accesses only the byte at address $0900 R/Ŵ tells memory (or peripheral) if MC9S12 is reading or writing R/Ŵ high => read R/Ŵ low => write E clock tells memory when MC9S12 is reading (writing) synchronizes data accesses LSTRB (together with ADDR0) tells memory if MC9S12 is accessing one or two bytes The MC9S12 has address regions occupied by internal memory and peripherals A diagram showing which address regions are used is called a memory map

Here is a memory map of the MC9S12DP256 with no added memory or peripherals The Expanded MC9S12 Memory Map We will add external peripherals to the MC9S12 First, we will disable the Flash EEPROM at address 0x4000 through 0x7FFF (which we are not using anyway) Here is a memory map of the MC9S12DP256 with the peripherals we will add

The peripherals will be put at 0x4000 and 0x4001 EE 308 Spring 2014

Simplified MC9S12 Write Cycle When the MC9S12 writes data to memory it does the following : It puts the address it wants to write to on the address bus (when E-clock goes low) It puts the data it wants to write onto the data bus It brings the Read/Write (R/W) line low to indicate a write The MC9S12 expects the external device at the given address will latch the data into its registers data on the falling edge of the E-clock

Simplified MC9S12 Read Cycle When the MC9S12 reads data from memory it does the following: It puts the address it wants to read from on the address bus (when E-clock goes low) It brings the Read/Write (R/W) line high to indicate a read The MC9S12 expects the external device at the given address will put data on the data bus On the falling edge of the E-clock, the MC9S12 latches the data into its internal register

The Real MC9S12DP256 Bus Up to now we have been using the MC9S12 in Single Chip Mode In Single Chip Mode the MC9S12 does not have an external address/data bus The MC9S12 can be run in Expanded Mode In Expanded Mode the MC9S12 does have an external address/data bus Things are a little more complicated on the real MC9S12DP256 bus than shown in the simplified diagrams above: The MC9S12DP256 has a multiplexed address/data bus The MC9S12DP256 sometimes accesses a single byte on a memory cycle, and it sometimes access two bytes on a memory cycle

The Multiplexed Address/Data Bus The MC9S12DP256 has a limited number of pins it can use To have full 16-bit address bus and a full 16-bit data bus the MC9S12DP256 would need to use 32 extra pins (in addition to several pins used for the control bus) To save pin count Motorola uses the same set of pins for several purposes When put into expanded mode, the MC9S12 uses the pins normally used for Ports A and B for its mulitplexed address and data bus When running in expanded mode you can no longer use Ports A and B as general purpose I/O lines The MC9S12 uses the same sixteen lines of Ports A and B for both address and data When the E-clock is low the sixteen lines AD15-0 are used for address When the E-clock is high the sixteen lines AD15-0 are used for data

The MC9S12 Address and Data Buses MC9S12 has 16 bit address and 16 bit data buses It Requires 35 bits! Not enough pins on MC9S12 to allocate 35 pins for buses and pins for all other functions

Memory Chip Interface Memory chips need separate address and data bus Need way to de-multiplex address and data lines from MC9S12 Memory chips need different control lines than the MC9S12 supplies These control lines are: Chip Select goes low when the MC9S12 is selecting memory chip Write Enable goes low when the MC9S12 is writing to memory Output/Read Enable goes low when the MC9S12 is reading from memory High Byte Enable goes low when the MC9S12 is accessing the High Byte (Odd Address) of memory Low Byte Enable goes low when the MC9S12 is accessing the Low Byte (Even Address) of memory

The Multiplexed Address/Data Bus To talk to memory chip we will need to build a de-multiplexer between the MC9S12 and the memory chip MCS12 has 16 bit address and 16 bit data buses Requires 35 bits

Not enough pins on MC9S12 to allocate 35 pins for buses and pins for all other functions Solution: multiplex address and data buses MC9S12 uses Ports A and B as mulitplexed address/data bus In expanded mode, you can no longer use Ports A and B for I/O 16 bit Bus: While E low, bus supplies address (from MC9S12) While E high, bus supplies data (from MC9S12 on write, from memory on read)