9S12C Multiplexed Bus Expansion

Slides:



Advertisements
Similar presentations
VHDL 8 Practical example
Advertisements

PROGRAMMABLE PERIPHERAL INTERFACE -8255
H. Huang Transparency No.5-1 The 68HC11 Microcontroller Chapter 5: Operation Modes and Memory Expansion The 68HC11 Microcontroller Han-Way Huang Minnesota.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Hardware interfacing  Supplying Clock & Power  Buses and bridges  DC/AC analysis  Timing analysis  Design considerations  Design for worst case.
I/O Subsystem Organization and Interfacing Cs 147 Peter Nguyen
9/20/6Lecture 3 - Instruction Set - Al Hardware interface (part 2)
Architecture of the 8051 INTERNAL DATA BUS Oscillator & Timing Programmable I/O (32 Pins) 80C51 CPU 64K byte Expansion Control Serial I/O 4K Program Memory.
Basic Computer Organization CH-4 Richard Gomez 6/14/01 Computer Science Quote: John Von Neumann If people do not believe that mathematics is simple, it.
1 The 8051 Microcontroller and Embedded Systems CHAPTER INTERFACING TO EXTERNAL MEMORY.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
CPU Interfacing Memory.
Basic I/O Interface A Course in Microprocessor
Minimum System Requirements Clock Generator Memory Interfacing.
Memory Interface A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
AT91 Memory Interface. 2 Features –Up to 8 programmable chip select lines –Remap Command allows dynamic exception vectors –Glue-less for both 8-bit and.
Programmable Peripheral Interface Parallel port Interface 8255
Programmable Interrupt Controller (PIC)
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
ECE 371 Microprocessor Interfacing
1 Expanded Modes, Bus, External Memory Today: First Hour: Expanded Modes, Bus, Timing –Section of Huang’s Textbook –In-class Activity #1 Second.
1 Bringing it all together: Exploring the EVB Today: First Hour: Bringing it all together by exploring the EVB –Section of Huang’s Textbook.
8255:Programmable Peripheral Interface
1 Bringing it all together: Exploring the EVB Today: First Hour: Bringing it all together by exploring the EVB –Section of Huang’s Textbook.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
8255 Programmable Peripheral Interface
EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Homework Reading Tokheim, Chapter 12-1 through 12-4.
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
The 8085 Microprocessor Architecture
Place your image on top of this gray box. If no graphic is
Fri. Sept 29 Announcements
Mon. Oct 2 Announcements Quiz Postponed to Wednesday – still only on 2.a + 2.b Video lecture for 2.a posted Lab 6 experiment extension You must come to.
Homework Reading Machine Projects Labs
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: Internal fault (e.g.. divide by.
The 8085 Microprocessor Architecture
Wed. Sept 20 Announcements
COMP2121: Microprocessors and Interfacing
Programmable Interval Timer
Lab Practical #1 Review Tim Rogers 2017.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
The 8255 Programmable Peripheral Interface
Memory Units Memories store data in units from one to eight bits. The most common unit is the byte, which by definition is 8 bits. Computer memories are.
8085 Microprocessor Architecture
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Architecture of Microprocessor (Intel 8085) Unit-I
Microcontroller Intel 8051
Chapter 11 Sequential Circuits.
Interfacing Memory Interfacing.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255.
AT91 Memory Interface This training module describes the External Bus Interface (EBI), which generatesthe signals that control the access to the external.
Parallel communication interface 8255
Architecture & Support Components
The 8051 Microcontroller (8 bit )
Programmable Peripheral Interface
8085 Microprocessor Architecture
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
The 8085 Microprocessor Architecture
The 8051 Microcontroller (8 bit )
Chapter 4 Introduction to Computer Organization
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Place your image on top of this gray box. If no graphic is
Modified from notes by Saeid Nooshabadi
8085 Microprocessor Architecture
Programmable Interrupt Controller (PIC)
The Programmable Peripheral Interface (8255A)
Computer Operation 6/22/2019.
Presentation transcript:

9S12C Multiplexed Bus Expansion Module 2.B 9S12C Multiplexed Bus Expansion Tim Rogers 2017

A+B are the most complex interface we will study in 362 Learning Outcome #2 “An ability to interface a microcontroller to various devices” A+B are the most complex interface we will study in 362 Bus Timing Analysis 9S12C Multiplexed Bus Expansion General-Purpose I/O Ports Buffered I/O Handling Interrupt Handling Buffered, Interrupt-Driven Printer Design Example How?

Some Introduction Internal visibility: We can see what is happening on the internal bus as well as the external one Single Chip Mode (just use internal SRAM). Expanded Mode (Can hook up external SRAM and turn on “internal visibility”) The expanded data bus can be 8-bits (“narrow mode”) or 16- bits (“wide mode”) Signals of interest include the following: Port A – high byte of address/data (wide mode) or high byte of address/8-bit data (narrow mode) Port B – low byte of address/data (wide mode) Port E – bus control signals E – bus clock (used to de-multiplex the address and data) R/W’ – read/write enable LSTRB’ – low byte strobe (used to distinguish word writes from byte writes in “wide” mode) By Default: 9S12 is Normal Single Chip Mode (no signals visible) For HW 5 Q 3 and 4: Normal Expanded Narrow Mode used. With internal visibility turned on. For Lab 5: Normal Expanded Wide Mode used. With internal visibility turned on.

High-level Picture of External Memory 2.B 2.A Only one bus for Address and Data Bus is “Multiplexed”: 1st half of clock cycle: do address 2nd half of clock cycle: send data Address Latch + Address Decode PLD CPU External Memory Chip Chip Enable (CE) 16-bits / Data/Address Bus Address (in) 8-bits / Data (in/out) R/W’ Output Enable (OE) CLK Write Enable (WE)

Figure 1 of AN2408

Schematic Based on PLD Note: Schematic is based on pin assignments generated automatically by the fitter for this PLD.

Interface Logic ABEL source file available on Homework page MODULE mem9s12c TITLE '9S12C Memory Interface' DECLARATIONS PA0..PA7 pin; " MCU Port A ECLK pin; " MCU E-clock RW pin; " MCU Read/Write !CS, !OE, !WE pin istype 'com'; LA8..LA15 pin istype 'reg_D'; " demultiplexed address EQUATIONS [LA8..LA15].D = [PA0..PA7]; [LA8..LA15].CLK = ECLK; CS = !LA15.Q & ECLK; " map SRAM into lower half of address space OE = RW & ECLK; WE = !RW & ECLK; END Port A will be used for data on 2nd half of clock cycle. Latch it on the 1st half. Same logic for OE and WE that we saw in simple examples CS = CE: Only asserted when uppermost bit is 0.

Fitter Report (Summary)

Critical Path Analysis: OE and WE These are the combinational output delay paths (pertinent for OE and WE).

Critical Path Analysis: Latched Address These are the clock edge to latched output delay paths (where ECLK provides the clock edge). Note that the latched (de-multiplexed) address bus is valid 4 ns following the low-to-high ECLK transition; the CS signal, which here is dependent on LA15 and being gated with ECLK, is valid 7.5 ns following the low-to-high ECLK transition.

9S12C Bus Signals Note: These signals are not available on the 9S12C32

9S12C A.C. Specifications (Sample)

This figure combines what happens read and write diagrams 9S12C General External Bus Timing This figure combines what happens read and write diagrams Bus on Read Bus on Write

9S12C General External Bus Timing

9S12C General External Bus Timing

9S12C General External Bus Timing

9S12C A.C. Specifications (Sample)

9S12C General External Bus Timing tCY

9S12C A.C. Specifications (Sample)

9S12C General External Bus Timing tCY tAD

9S12C A.C. Specifications (Sample)

9S12C General External Bus Timing tCY tAD tMAH

9S12C A.C. Specifications (Sample)

9S12C General External Bus Timing tCY tDSR tAD tDHR tMAH

9S12C A.C. Specifications (Sample)

9S12C General External Bus Timing tCY tDSR tAD tDHR tMAH tDDW

9S12C A.C. Specifications (Sample)

9S12C General External Bus Timing tCY tDSR tAD tDHR tMAH tDHW tDDW

9S12C A.C. Specifications (Sample)

“input setup” time (tIS) available on write 9S12C General External Bus Timing tCY tDSR tAD tDHR tMAH tDSW tDHW tDDW “input setup” time (tIS) available on write

9S12C A.C. Specifications (Sample)

“input setup” time (tIS) available on write 9S12C General External Bus Timing tCY tDSR tACCA tAD tDHR tMAH tDSW tDHW tDDW “input setup” time (tIS) available on write “address access” time (tAA) available on read

9S12C A.C. Specifications (Sample)

“input setup” time (tIS) available on write 9S12C General External Bus Timing tCY tDSR tACCA tAD tDHR tMAH tDSW tDHW tDDW tRWD Note: tRWD != tAD For expanded bus “input setup” time (tIS) available on write “address access” time (tAA) available on read

9S12C A.C. Specifications (Sample)

“input setup” time (tIS) available on write 9S12C General External Bus Timing tCY tDSR tACCA tAD tDHR tMAH tDSW tDHW tDDW tRWD tRWH “input setup” time (tIS) available on write “address access” time (tAA) available on read

9S12C CPU Read/Write Timing Diagram tCYC = 40 ns

9S12C CPU Read/Write Timing Diagram

9S12C CPU Read/Write Timing Diagram

9S12C CPU Read/Write Timing Diagram

9S12C CPU Read/Write Timing Diagram Spoiler alert – this is the solution to problem 2 on homework 5

MSO Display for Experiment 5 Demo Code ECLK   R/W LSTRB PB0 LA15-LA0    PA0-7 PB0-7

Potential Design Question Given: 9S12 operating with/without stretch A specific PLD you can get timings for + abel file with associated with with logic A specific SRAM part with the data sheet Determine: Does this setup violate setup/hold times What is the read margin What is the maximum clock rate you can sustain and still achieve 10% margin. When calculating margin as a percent, it is a percent of what? The SRAM timing parameter that is determining the critical path

Example Timing Diagram

9S12 Configurable Memory Map Out of reset, SRAM is mapped to 800-FFF Out of reset, Flash is mapped to 8000-FFFF

Configuration Registers 9212 CPU registers are A, B, D, SP, PC, X and Y THESE HAVE NOTHING TO DO WITH THE CONFIGURATION REGISTERS There when we use the microcontroller there is a lot of setup/initialization of the CPU/Peripherals/Pins etc… We control these via “memory mapped registers” or “configuration registers” A portion of the address space is devoted to these registers and when you write to these locations the value doesn’t actually go to memory is goes to a configuration register

9S12 Configurable Memory Map This is the space devoted to configuration registers To maximize space, configuration is often done on a bit-by-bit basis.

Our first (of many) configuration registers INITRM Register (initializes SRAM position in memory) INITRM Register (8-bits) Memory location: $11 Bits 7-3 named: RAM15-RAM11 So by default - SRAM mapped to: 0000 1000 0000 0000b to 0000 1111 1111 1111b or $800 to $FFF Recall: only 2k (11-bits) worth of internal SRAM on the 9S12 These bits specify the upper 5 bits of the SRAM address. Out of reset these bits are 00001b

Can use other confirmation registers to remap all regions If conflicts occur, the following precedence applies: register space internal SRAM byte-erasable EEPROM (not on 9S12C32) flash external memory