1 / 30

ECE 353 Introduction to Microprocessor Systems

ECE 353 Introduction to Microprocessor Systems. Michael G. Morrow, P.E. Week 8. Topics. Logic Compatibility Microprocessor peripherals Timers Periodic Watchdog Real-time ADuC7026 timers Pulse-width modulators (PWM) Direct memory access (DMA). FET Basics.

avedis
Download Presentation

ECE 353 Introduction to Microprocessor Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 353Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 8

  2. Topics • Logic Compatibility • Microprocessor peripherals • Timers • Periodic • Watchdog • Real-time • ADuC7026 timers • Pulse-width modulators (PWM) • Direct memory access (DMA)

  3. FET Basics • Field effect transistors (FETs) are used as the switching elements in logic gates • When turned on, the FET presents a very low impedance to current, like a closed switch • When turned off, the FET presents a very high impedance to current, like an open switch • There are two ways to construct a FET • N-channel P-channel

  4. Logic Outputs • Totem-pole • Three-state (tri-state) • Open-drain

  5. Logic Family Characteristics • Voltage • VIHmin– minimum input voltage recognized as a logical 1 • VILmax – maximum input voltage recognized as a logical 0 • VOHmin – minimum voltage output for a logical 1 • VOLmax – maximum voltage output for a logical 0 • Current • Currents are defined positive in, negative out • IOHmax– maximum output current sourced for a logical 1 • IOLmax – maximum output current sunk for a logical 0 • IIHmax – maximum input current required at a logical 1 • IILmax – maximum input current required at a logical 0 • IOZH, IOZL – current drawn/sourced when tri-stated • Logic families

  6. Simple Circuit Models • Drivers • Receivers

  7. DC Noise Margins

  8. Logic Compatibility • Static (DC) Compatibility • Voltage • Current • Overvoltage tolerant inputs • Dynamic compatibility • Capacitive loading, mutual induction, reflections, etc. • Exercises

  9. Timer Peripherals • Timer/counter modules used to • Generate signals with specified frequency / duty cycle • Count external events, measure pulse width • Generate absolute delays, periodic interrupts • Building a timer peripheral • Basic free-running timer • Periodic timer enhancements • Clock selection and prescaling • Adding capture capability

  10. A Basic Free-Running Timer

  11. A Periodic Timer

  12. Clock Selection and Prescaling

  13. Capture Capability

  14. Real-Time Clocks (RTCs) • RTCs provide microprocessor systems with absolute time information • Absolute time does not necessarily mean calendar/clock time • Typically operate from 32.768KHz crystal with battery or capacitor back-up power supply • Generate periodic interrupts • Often contain a small amount of RAM – historically this was where the PC stored its configuration (BIOS) settings since it was non-volatile. • Dallas Semiconductor DS1375

  15. Watchdog Timers • Watchdog timers are used to guard a system against lock-up due to software errors or soft failures in hardware • Often included in microcontrollers and CPU supervisor circuits. • Retriggering is usually done in the main program loop • Watchdog output can be used to reset the CPU or as a nonmaskable interrupt (NMI) • Maxim MAX6323/MAX6324

  16. ADuC7026 Timers • Timer0 • A basic periodic timer, intended to be used as the RTOS timer • 16-bit counter, free-running or period register • CPU core clock with prescaler • Generates interrupt and/or ADC conversion trigger • MMRs

  17. ADuC7026 Timers • Timer1 • General-purpose timer • 32-bit counter • Multiple clock sources with prescaler • Capture register • Binary or H:M:S formats

  18. ADuC7026 Timers • Timer2 • Wake-up timer • 32-bit counter • Can run on 32kHz clocks • Binary or H:M:S format

  19. ADuC7026 Timers • Timer3 • Watchdog or general-purpose timer • 16-bit counter • 32kHz clock source • Watchdog timer is reset by writing to T3CLRI MMR • Requires pseudo-random sequence in secure clear mode

  20. Timer3 Secure Clear Mode

  21. PWM Peripherals • A basic pulse-width modulator peripheral creates a rectangular wave whose duty cycle can be controlled • PWM allows us to control the average power delivered to a load without changing the voltage supplied to it • The ADuC7026 contains a very capable 3-phase PWM that is intended to do motor control

  22. DMA Controllers • Direct memory access (DMA) controllers are peripherals devices designed to offload data movement from the processor • A common use is in servicing peripherals by collecting a frame of data for the CPU to work on, or sending out a frame of data to a peripheral as it needs it • To use DMA, we need to • Program the DMA controller for the task • Processor does other things • The DMA controller interrupts the processor when it has completed. • DMA controllers usually have an auto-reload feature to do a repetitive task without the CPU having to reconfigure it every time.

  23. DMA Controllers (cont) • Typical DMA controllers are programmed with the following information • Source address and destination address • Should address be modified at each transfer, and by how much? • Transfer size • How many bytes should it transfer each time? • Number of transfers • Trigger event • What causes the DMA controller to do transfers?

  24. Wrapping Up • Homework #4 is due Wednesday, March 21 • Reading for next week • Textbook 11 • ADUC 9-10, 33-36, 43-47, 79-82

  25. Logic Compatibility Exercises • For the following logic families, determine compatibility, noise margins, and fan-out. • 74ALS driving 74AC • 74AC driving 74ALS Note: For 74AC, top line is with CMOS load, bottom line is with TTL load.

  26. TinyLogicTM and Little Logic

  27. Timer0 MMRs • T0LD – load counter value • T0VAL – read counter value • T0CLRI – clear timer interrupt • T0CON - Configuration

  28. DS1375RTC

  29. MAX6323

  30. PWM DAC • Use PWM digital output driver • LPF removes most of AC components

More Related