Digital Converter - Microcontroller Systems - Lecture Slides, Slides of Microcontrollers

In the class of computer sciences, we have a special class for the Microcontroller Systems. The main points in these slides are:Digital Converter, Block Diagram, Memory Addresses, Analog-To-Digital Converter, Conversion Command Queues, Interrupt Generation, Successive Approximation, Conversion Modes, Single-Scan Software-Triggered

Typology: Slides

2012/2013

Uploaded on 04/24/2013

ballari
ballari 🇮🇳

4.6

(10)

117 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MPC 555 QADC64
Analog-to-Digital Converter
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Digital Converter - Microcontroller Systems - Lecture Slides and more Slides Microcontrollers in PDF only on Docsity!

MPC 555 QADC

Analog-to-Digital Converter

MPC555 Block Diagram

Internal Memory Map

A Simple MMR-Driven Device

Queued Analog-to-Digital Converter

  • Each QADC module includes:
    • 16 basic channels (internal multiplexing)
    • Direct external multiplexing support for up to 41 channels
    • 10-bit A-to-D conversion with programmable input sample time
    • 2 Conversion Command Queues to control operation
      • Prioritize and “program” the conversions
    • Queue complete (or paused) interrupt generation
    • Conversions can be initiated by:
      • External trigger (off of a pin)
      • Time intervals
        • Includes an internal PIT-like timer
      • Software command
    • Results of conversions are cached until the next queue run-through is complete.
    • Ability to use the channel pins as digital I/O ports

QADC Block Diagram

The “Big Picture”

Conversion Example (single-scan software-triggered)

  • Device: Thermocouple
    • A sensor which reports back temperature in the form of a voltage
    • Higher voltage  Higher temperature
  • System:
    • A device which, upon prompting of the user, will report the temperature
  • QADC Setup:
    • Single-scan mode
    • Connect the thermocouple to an input pin
    • Setup the command queue to read from the thermocouple’s pin
    • When the user asks, start the conversion by setting a register bit ( similar to PIT )

Conversion Example (continuous-scan timer-triggered)

  • Device: Thermocouple
    • A sensor which reports back temperature in the form of a voltage
    • Higher voltage  Higher temperature
  • System:
    • A device which samples the temperature every X seconds and performs a system shutdown if it becomes higher than a certain threshold (safety sensor!)
  • QADC Setup:
    • Continuous-scan mode
    • Connect the thermocouple to an input pin
    • Setup the command queue to read from the thermocouple’s pin
    • Setup the QADC to generate an interrupt whenever a queue scan completes
    • Setup the QADC timer to start a scan every X seconds
    • Check the temperature in the Interrupt Handler

QADC Conversion Command Word Table (CCW)

Essentially an “Instruction Memory” for the converter

Each entry contains:

Using the CCW and Getting Results

The CCW is best accessed as a pointer/array, i.e.

unsigned short * CCW_A = (unsigned short *) 0x304A00; … CCW_A[0] = (unsigned short) 0x00F9;

CCW_A[1] = (unsigned short)0x003F;  “End of Queue”

On each scan pass-through, this queue will convert channel AN57 using

QCLK period x 16 sample time, then stop.

Using the CCW and Getting Results

You can also access the result queue as a pointer/array

The result of each scan in the CCW will show up in the corresponding entry of the result arrays. (parallel array structure)

From the example earlier: You can get the result of the analog scan at offset 0 from the result reg pointer

value = QADC_RJURR[0];