Top Banner
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 11
44

ECE 353 Introduction to Microprocessor Systems

Feb 01, 2016

Download

Documents

Anoush

ECE 353 Introduction to Microprocessor Systems. Michael G. Morrow, P.E. Week 11. Topics. System Timing Hardware/Software trade-offs Execution time Bus Timing WAIT states Memory device timing parameters Timing compatibility Time Measurement Delay loops Hardware Timers. System Timing. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ECE 353 Introduction to Microprocessor Systems

ECE 353Introduction to Microprocessor Systems

Michael G. Morrow, P.E.

Week 11

Page 2: ECE 353 Introduction to Microprocessor Systems

TopicsSystem Timing Hardware/Software trade-offs Execution time

Bus Timing WAIT states Memory device timing parameters Timing compatibility

Time Measurement Delay loops Hardware Timers

Page 3: ECE 353 Introduction to Microprocessor Systems

System TimingHardware/Software trade-offs Soft vs. hard real-time systems Task allocation Microprocessor clock frequency

Execution time Affected by numerous variables Difficult to predict Sample Instructions Delay loops

Page 4: ECE 353 Introduction to Microprocessor Systems

WAIT StatesWAIT states are used to lengthen the bus cycle for slower devices Extra T3 states are run

WAIT state control CSU WS setting READY signal

Normally ready Normally not-ready External circuits

CSU RDY setting

Page 5: ECE 353 Introduction to Microprocessor Systems

Memory Device TimingRead Cycle TAA / TOH TACS / TCHZ TOE / TOHZ TRC Effect of grounding device’s /CS

Write Cycle /WE vs. /CS controlled Timing Parameters Write cycle

Page 6: ECE 353 Introduction to Microprocessor Systems

27C512EPROM

Page 7: ECE 353 Introduction to Microprocessor Systems

HM624100HCSRAM

Page 8: ECE 353 Introduction to Microprocessor Systems

Timing CompatibilityNeed to determine if devices are compatible with the microprocessor at the selected clock speed.Want to use the cheapest (usually the slowest) parts we can get by with.Two basic timing issues to resolve: Setup and Hold Times

Latching information (inputs) Output Delay and Float Times

Turning drivers on and off (outputs)

Page 9: ECE 353 Introduction to Microprocessor Systems

Assessing Timing Compatibility

Need to know whether CPU will operate with the TAA for given device. (read cycle) Address valid at start of T1 Data is latched by CPU at start of T4

To get an accurate TAVDV, must include the delays for the address becoming valid, and include the setup time for data. Address valid delay relative to CLKOUT edge Setup time required relative to CLKOUT edge A.C. Specifications 1 & 2

Page 10: ECE 353 Introduction to Microprocessor Systems

System Timing Compatibility

Need to account for all delays in a system to assess timing compatibility.Consider the system in Fig 13.5-2.Analyze the read timing with regard to: TACC – address access time TCE – chip enable to valid data TOE – output enable to valid data TDF – output hold time

How do wait states impact the timing?Read Cycle A.C. Specs 1 , 2 Relative timings

Page 11: ECE 353 Introduction to Microprocessor Systems

System Timing Compatibility

Consider the system in Fig 13.5-2.Analyzing write cycle timing. TW, TDW, TDH TASW, TAW, TCW TWR

This is not the entire story – if there is excessive capacitance, long wires, etc., you must account for the delays.Other bus effects

Page 12: ECE 353 Introduction to Microprocessor Systems

80C188EB Timer/Counter Unit

Three independent timer/countersTimer/counter modules used to Generate signals with specified frequency /

duty cycle Count external events, measure pulses Generate absolute delays, periodic interrupts

Timer 0/1 Modes of operation

Continuous / Non-continuous Single or Dual Maximum Count Input Sources

Flowchart Configured and operated through PCB registers

T0CON, T0CNT, T0CMPA, T0CMPB

Page 13: ECE 353 Introduction to Microprocessor Systems

80C188EB Timer/Counter Unit

Timers 2 is much more limited. Operated through PCB registers

T2CON, T2CNT, T2CMPA, T2CMPB Useful as a prescaler or as a periodic

interrupt source.

Timer applications Frequency measurement. Waveform generation.

Page 14: ECE 353 Introduction to Microprocessor Systems

82C54 PIT/CProvides additional timer/counter resources for microprocessor system. Appears as 4 byte-wide registers

Control register (3) Timer registers (0,1,2)

Program by writing 3 bytes in sequence Control byte Timer word

Three independent 16-bit counters BCD or binary DC-10MHz input range Multiple modes of operation

Page 15: ECE 353 Introduction to Microprocessor Systems

Real-Time ClocksRTCs provide microprocessor systems absolute time information Typically operate from 32.768KHz

crystal Battery back-up Periodic interrupts Often contain small amount of RAM –

historically this was where the PC stored its configuration settings since it is non-volatile.

Dallas Semiconductor DS12887

Page 16: ECE 353 Introduction to Microprocessor Systems

Watchdog TimersWatchdog timers are used to guard a system against lock-up due to software errors or soft-failures in hardware. Often included in CPU supervisor circuits.

Retriggering usually done in the main program loop.Watchdog output can be used to reset the CPU or as an NMI.Maxim MAX6323/MAX6324

Page 17: ECE 353 Introduction to Microprocessor Systems

Wrapping UpHomework #6 due Friday, 11/30/2001Exam #2 on Tuesday, 11/20/2001 at 7:15pm in 132 Nolan (same as Exam #1)

Page 18: ECE 353 Introduction to Microprocessor Systems

WAIT States

Page 19: ECE 353 Introduction to Microprocessor Systems

WAIT State Generator

Page 20: ECE 353 Introduction to Microprocessor Systems

Chip-Select Start Reg

Page 21: ECE 353 Introduction to Microprocessor Systems

Chip-Select Stop Register -Part 2

Page 22: ECE 353 Introduction to Microprocessor Systems

Memory Device Read Cycle

Page 23: ECE 353 Introduction to Microprocessor Systems

Memory Device Write Cycle

Page 24: ECE 353 Introduction to Microprocessor Systems

Instruction Execution Times

Page 25: ECE 353 Introduction to Microprocessor Systems

Input Setup and Hold

Page 26: ECE 353 Introduction to Microprocessor Systems

Output Delay and Float

Page 27: ECE 353 Introduction to Microprocessor Systems

Read Cycle

Page 28: ECE 353 Introduction to Microprocessor Systems

A.C. Specs (1)

Page 29: ECE 353 Introduction to Microprocessor Systems

A.C. Specs (2)

Page 30: ECE 353 Introduction to Microprocessor Systems

Relative Timing

Page 31: ECE 353 Introduction to Microprocessor Systems

Write Cycle

Page 32: ECE 353 Introduction to Microprocessor Systems

Fig. 13.5-2

Page 33: ECE 353 Introduction to Microprocessor Systems

TxCONPart 1

Page 34: ECE 353 Introduction to Microprocessor Systems

TxCONPart 2

Page 35: ECE 353 Introduction to Microprocessor Systems

T2CON

Page 36: ECE 353 Introduction to Microprocessor Systems

Timer/Counter Block Diagram

Page 37: ECE 353 Introduction to Microprocessor Systems

Timer 0/1

Page 38: ECE 353 Introduction to Microprocessor Systems

Timer Modes

Page 39: ECE 353 Introduction to Microprocessor Systems

Timer 0/1Flowchart

Page 40: ECE 353 Introduction to Microprocessor Systems

Timer 0/1Flowchart

Page 41: ECE 353 Introduction to Microprocessor Systems

Frequency Measurement

Page 42: ECE 353 Introduction to Microprocessor Systems

DS12887RTC

Page 43: ECE 353 Introduction to Microprocessor Systems

MAX6323

Page 44: ECE 353 Introduction to Microprocessor Systems

82C54 PIT/C