Chapter 9 Data Acquisition Comparator_A

Slides:



Advertisements
Similar presentations
Chapter 6 General Purpose Input/Output
Advertisements

Chapter 13 Flash Programming
Chapter 9 Data Acquisition Comparator-Based Slope ADC
555 Timer 555 Timer Digital Electronics TM 1.2 Introduction to Analog
Chapter 14 Communications Introduction
Chapter 4 MSP430 Architecture
Chapter 8 LCD Controller
Chapter 14 Companion site for Light and Video Microscopy Author: Wayne.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Chapter 14 Feedback and Oscillator Circuits
FIGURE 3.1 System for illustrating Boolean applications to control.
FIGURE 2.1 The purpose of linearization is to provide an output that varies linearly with some variable even if the sensor output does not. Curtis.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Review 0、introduction 1、what is feedback?
Chapter 9 Data Acquisition Operational Amplifiers
1 Peripheral Component Interconnect (PCI). 2 PCI based System.
UBI >> Contents 1 Copyright 2009 Texas Instruments All Rights Reserved Chapter 15 Advanced Laboratories RoboSapien powered by MSP430.
Chapter 3 Basic Logic Gates 1.
Chapter 3 (part 1) Basic Logic Gates 1.
DAQmx下多點(Multi-channels)訊號量測
The op-amp Differentiator
25 seconds left…...
Digital-to-Analog Converters and Analog Comparators Professor Yasser Kadah –
We will resume in: 25 Minutes.
UBI >> Contents Chapter 10 Digital-to-Analogue Conversion MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro.
Interfacing to the Analog World
Interfacing to the Analog World
©2004 Brooks/Cole FIGURES FOR CHAPTER 11 LATCHES AND FLIP-FLOPS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter.
Multivibrators and the 555 Timer
UBI >> Contents Chapter 2 Software Development Tools Code Composer Essentials v3: Overview Texas Instruments Incorporated University of Beira Interior.
UBI >> Contents Chapter 7 Timers Laboratories MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
Chapter 3 Hardware Development tools
555 Timer ©Paul Godin Updated February Oscillators ◊We have looked at simple oscillator designs using an inverter, and had a brief look at crystal.
Chapter 9 Data Acquisition A/D Conversion Introduction
Chapter 11 Direct Memory Access (DMA)
Analogue Input/Output
UBI >> Contents Chapter 12 Hardware Multiplier MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
UBI >> Contents Chapter 9 Data Acquisition Introduction MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro.
UBI >> Contents Chapter 15 Advanced Laboratories RF link using the eZ430-RF2500 MSP430 Teaching Materials Texas Instruments Incorporated University of.
Projekt „ISSNB“ Nis, October DAAD Deutscher Akademischer Austausch Dienst German Academic Exchange Service PC-Based RLC Meter Mare Srbinovska,
1 Applied Control Systems Technology. 2 Pin configuration Applied Control Systems.
ARM Timers.
System Clocks.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Digital to Analogue Converter
UBI >> Contents Lecture 10 Digital-to-Analogue Conversion & Direct Memory Access (DMA) MSP430 Teaching Materials Texas Instruments Incorporated University.
SIGMA-DELTA ADC SD16_A Sigma-Delta ADC Shruthi Sujendra.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior.
UBI >> Contents Lecture 6 Digital-to-Analogue Conversion, Direct Memory Access (DMA) & Hardware Multiplier MSP430 Teaching Materials Texas Instruments.
UBI >> Contents Lecture 6 Operating Modes, General Purpose Input/Output and LCD Controller MSP430 Teaching Materials Texas Instruments Incorporated University.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Creating a project Texas Instruments Incorporated University of Beira.
UBI >> Contents Lecture 5 Sigma-Delta (SD) converter, Slope converter & Comparator_A MSP430 Teaching Materials Texas Instruments Incorporated University.
UBI >> Contents Lecture 8 SAR ADC MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
Lab 3: ADC.
TITLE: 555 Timer OM INSTITUTE OF TECHNOLOGY Subject: Analog Electronics ( ) Semester: 03 Prepared By:
Application Case Study Christmas Lights Controller
16F877A.
Chapter 10 Digital-to-Analogue Conversion
Clock Signals: 555 Timer 555 Timer Digital Electronics TM
555 Timer EEE DEPARTMENT KUMPAVAT HARPAL( )
Chapter 6 General Purpose Input/Output
MSP430 Teaching Materials
555 Timer 555 Timer Digital Electronics TM 1.2 Introduction to Analog
555 Timer 555 Timer Digital Electronics TM 1.2 Introduction to Analog
MSP432™ MCUs Training Part 6: Analog Peripherals
Radhabai Kale mahila mahavidyalaya,ahmednagar Department of Physics
Chapter 15 Advanced Laboratories RF link using the eZ430-RF2500
Presentation transcript:

Chapter 9 Data Acquisition Comparator_A MSP430 Teaching Materials Chapter 9 Data Acquisition Comparator_A Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department www.msp430.ubi.pt Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Contents Introduction to Comparator_A Features Voltage reference generator Comparator_A interrupts Comparator_A registers Lab5D: Signal Acquisition Quiz Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Introduction to Comparator_A (1/2) Comparator_A module is primary designed to support: Low cost precision slope A/D conversions; Resistance measurement; Voltage measurement; Current measurement; Capacitance measurements.. Requires few external components; Battery-voltage supervision; Monitoring of external analogue signals. It is used on the FG4618 device (Experimenter’s board). Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Introduction to Comparator_A (2/2) Comparator_A block diagram: Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Comparator_A Features Multiplexed inverting and non-inverting inputs; Software selectable low-pass filter (RC) for the output; Outputs: Timer_A capture input; Interrupt (one interrupt vector with enable): CAIFG; External: GPIO. Software control of the port input buffer; Selectable references, external or internal (reference voltage generator): VCAREF = 0.25 VCC; VCAREF = 0.5 VCC; VCAREF = ~0.55 V (diode); Comparator and reference generator can be powered down. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Comparator_A components Compares the analogue voltages at the (+) and (–) input terminals (CA0 and CA1 for a non-inverting topology); The comparator output: CAOUT = 1: CA0 > CA1; CAOUT = 0: CA0 < CA1 and CAON = 0 (switched off). Analogue input switches (selected with P2CAx bits): Individually connect or disconnect the two comparator input terminals to associated port pins. Output filter (CAF bit): Use the internal low pass filter to reduce errors (in accuracy and resolution) associated with comparator oscillation. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Comparator_A interrupts One interrupt flag, CAIFG, and one interrupt vector are associated with Comparator_A; Condition for an interrupt: CAIFG = 1: Rising or falling edge at comparator output (CAIES bits); Interrupt request when CAIE = 1 and GIE = 1. CAIFG = 0: Interrupt request serviced; Reset by software. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Comparator_A (1/2) Registers CACTL1, Comparator_A Control Register 1 Bit Description 7 CAEX Comparator_A exchange: CAEX = 1  Exchanges the comparator inputs and inverts the comparator output. 6 CARSEL Comparator_A reference: CAEX = 0: CAEX = 1: CARSEL = 0 VCAREF in + terminal VCAREF in - terminal CARSEL = 1 VCAREF in - terminal VCAREF in + terminal 5-4 CAREFx Comparator_A voltage reference: CAREF1 CAREF0 = 00  External (Internal reference off) CAREF1 CAREF0 = 01  VCAREF = 0.25 VCC CAREF1 CAREF0 = 10  VCAREF = 0.5 VCC CAREF1 CAREF0 = 11  VCAREF = 0.55 V (Diode reference) 3 CAON Comparator_A on when CAON = 1 2 CAIES Comparator_A interrupt edge: CAIES = 0  Rising edge CAIES = 1  Falling edge 1 CAIE Comparator_A interrupt enable when CAIE = 1 CAIFG The Comparator_A interrupt flag, CAIFG = 1 when an interrupt is pending Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Comparator_A (2/2) Registers CACTL2, Comparator_A Control Register 2 CAPD, Comparator_A Port Disable Register The 8-bit CAPD register allows individual enable or disable of each P1.x pin buffer, when the corresponding CAPDx = 0 or CAPDx = 1 values respectively are configured. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison Objective: With the Comparator_A module included in the MSP430FG4618 of the Experimenter´s board hardware development tool, perform a comparison of an external voltage signal with the internal reference. Details: Like the previous exercise (Lab4), this one is composed of several sub-tasks. This laboratory has been developed for the Code Composer Essentials version 3 software development tool only. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison Project files: C source files: Chapter 9 > Lab5 > Lab5D_student.c Solution file: Chapter 9 > Lab5 > Lab5D_solution.c Overview: This laboratory analyses the operation of Comparator_A. A voltage is applied to one of the comparator inputs, generated either by the DAC12 or by another external source; Whenever the external voltage value is higher than the compare value internally generated, an interrupt is generated that switches the LED state. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison A. Resources: The resources used by the application are: DAC12; Comparator_A; Digital IO; Timer_A. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison B. Software application organization: The application starts by stopping the Watchdog Timer; Timer_A is configured to generate an interrupt once every 1 msec, with the output of the DAC12 updated in order to provide a ramp signal; The Comparator_A’s output is configured to be accessible at pin P6.6, which is available at the Header 4 pin 7; The signal applied to CA0 input is compared with 0.5xVcc internal reference voltage; Every time that a compare match occurs, an interrupt is requested and switches the state of LED1. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison C. System configuration: Comparator_A configuration: Configure the registers in order to receive the external signal at the CA0 input and compare it with the internal reference 0.5xVcc; Enable the comparator with an interrupt triggered in a low-to-high transition of the comparator output. CACTL1 = _____________________; CACTL2 = _____________________; Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison D. Analysis of operation: The verification of this laboratory experiment can be accomplished by connecting the output of the DAC12, available on Header 8 pin 7, to the Comparator_A’s input CA0, available on Header 4 pin 7; Monitor the signals wave form at the input of the Comparator_A input and output using an oscilloscope; LED1 switches state whenever the input voltage value is lower than the compare value. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Lab5D: Voltage signal comparison MSP-EXP430FG4618 SOLUTION Using the MSP-EXP430FG4618 Development Tool and the MSP430FG4618 device, perform a voltage signal comparison with an internal reference. Comparator_A configuration: CACTL1 = CAON + CAREF_2 + CARSEL; // Enable comp, // ref = 0.5*Vcc CACTL2 = P2CA0; // Pin to CA0 Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (1/3) 22. Using the Comparator_A to measure resistive elements, its accuracy is limited by: (a) Precision of resistors, number of counts, capacitor precharge; (b) Precision of resistors, VCC stability, capacitor precharge; (c) RC tolerance, VCC stability, VREF stability; (d) None of above. 23. To use the Comparator_A with internal low pass filtering, the control register bit: (a) CAON must be reset; (b) CAF must be set; (c) CARSEL must be reset; (d) CAEX must be set. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (2/3) 24. To use the Comparator_A with an internal diode reference voltage at the positive terminal, configure the control register bits: (a) CAREFx = 2; CARSEL = 0; CAEX = 1; (b) CAREFx = 1; CARSEL = 1; CAEX = 1; (c) CAREFx = 3; CARSEL = 1; CAEX = 1; (d) CAREFx = 0; CARSEL = 0; CAEX = 0. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt

Copyright 2009 Texas Instruments Quiz (3/3) Answers: 22. (a) Precision of resistors, number of counts, capacitor precharge. 23. (b) CAF must be set. 24. (c) CAREFx = 3; CARSEL = 1; CAEX = 1. Copyright 2009 Texas Instruments All Rights Reserved www.msp430.ubi.pt