element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Frank Milburn's Blog MSP430FR2311 with "Smart Analog Combo" Operational Amplifier
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fmilburn
  • Date Created: 22 Aug 2018 12:32 AM Date Created
  • Views 2348 views
  • Likes 12 likes
  • Comments 8 comments
  • op amp
  • msp430fr2311
  • texas instruments
Related
Recommended

MSP430FR2311 with "Smart Analog Combo" Operational Amplifier

fmilburn
fmilburn
22 Aug 2018

I have a project in mind that requires operational amplifiers.  Recently Texas Instruments has released several microcontrollers that have low power precision op amps built in.  I have two in hand now that I will be testing - the MSP430FR2311 that is in this post and the larger MSP430FR2355 that I may end up using in my project.  I won't describe the parts in detail today but instead will fire the FR2311 up in a kind of hello world for op amps.

 

The FR2311 microcontroller has 3.75 k of FRAM persistent memory and 1 k of SRAM.  The Smart Analog Combo consists of a trans-impedance amplifier and operational amplifiers that can be configured as peripherals.  There is also serial, 10-bit ADC, comparator, and GPIO.

 

The FR2311 is available on a LaunchPad development board but I will be using one of my own little prototyping boards with the 16 pin TSSOP variant and another LaunchPad to program and power it.  In the photo below, the two resistors on the left are a voltage divider to pin 14 which is the non-inverting input to the op amp. 

image

The schematic below shows how the circuit is arranged to make a non-inverting amplifier.  The corresponding pin numbers on the FR2311 are in parenthesis.

image

I should note here that the FR2355 has additional capability including the ability to internally set the mode and gain from 1 to 33.  On the smaller FR2311 used here the gain and mode are controlled by an external circuit.

 

To start I set the op amp up as a buffer, i.e. to give unity gain.  The FR2311 has enough memory that DriverLib can be used which I prefer since it makes the code more readable.  Below is the code I used taken from the examples provided by TI with trivial changes.  Pretty short and sweet if you take out the TI boiler plate.

//******************************************************************************
//  MSP430FR231x Demo - SAC-L4, GP Mode with SAC OA
//
//  Description: Configure SAC-L4 for general purpose mode. The "+" terminal is
//  connected to external pad (IN+) and the "-" terminal is connected to external
//  pad (IN-). SAC OA is selected to low speed and low power mode.
//  ACLK = n/a, MCLK = SMCLK = default DCODIV ~1MHz.
//
//                MSP430FR231x
//             -------------------
//         /|\|                   |
//          | |          P1.4/OA0+|--> External pad
//          --|RST                |
//            |          P1.2/OA0-|--> External pad
//            |                   |
//            |                   |
//            |                   |
//            |                   |
//
//  Yang Lu
//  Texas Instruments Inc.
//  July 2015
//  Built with Code Composer Studio v6.1
//*****************************************************************************
#include "driverlib.h"
int main(void)
{
    //Stop WDT
     WDT_A_hold(WDT_A_BASE);
    //Configure P1.2/P1.4 as OA0 functionality
    GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1,
                                               GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN4,
                                               GPIO_TERNARY_MODULE_FUNCTION);
    
    // Disable the GPIO power-on default high-impedance mode to activate
    // previously configured port settings
    PMM_unlockLPM5();                       
    //Select external source for both positive and negative inputs
    SAC_OA_init(SAC0_BASE, SAC_OA_POSITIVE_INPUT_SOURCE_EXTERNAL,
                SAC_OA_NEGATIVE_INPUT_SOURCE_EXTERNAL);
    //Select low speed and high power mode
    SAC_OA_selectPowerMode(SAC0_BASE, SAC_OA_POWER_MODE_LOW_SPEED_HIGH_POWER);
    SAC_OA_enable(SAC0_BASE);                  // Enable OA
    SAC_enable(SAC0_BASE);                     // Enable SAC
}
/* --COPYRIGHT--,BSD
 * Copyright (c) 2016, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * --/COPYRIGHT--
 */

In the setup below the oscilloscope is providing a 3V internally generated square wave at 1000 Hz as input to the op amp on the FR2311.  The blue trace on the bottom is the input and the yellow trace is the output.

image

Let's have a closer look at the rising edge.  In the photo below the output has been superimposed on the input.  Major divisions on the time scale are 100 ns and the major divisions on the voltage scale are 500 mV for both traces.

image

The rise time on the output is about 1 us with a bit of overshoot.  So if I am interpreting this right the slew rate is about 3V / us.  I set the mode to "low speed" in the code so it would be interesting to set it to "high speed" and see what happens to slew rate.  Since my application will be DC amplification this isn't too important.

 

The photo below shows the falling edge with the same scales as above.

image

Let's now use the schematic above and set it up as a non-inverting DC amplifier.  My bench power supply is set to about 250 mV and connected to the input (OA0+).  The resistor Rf is 10k ohms and Rin is 1k ohms.  Substituting these values into the equation and solving for gain gives:

     G = (Rf / R1) + 1

     G = (10,000 / 1,000) + 1

     G = 11

 

The experimental setup is shown below.

image

The output voltage is 2.72 V and the input voltage is 246 mV.

     G = Vout / Vin

     G =  2.72 / 0.246

     G = 11.06

 

That is less than a percent error so close enough given the crude setup.

 

I plan to have a look at the MSP430FR2355 next.

 

Links

MSP430FR2311 LaunchPad

Additional Information at TI Site

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 7 years ago +4
    Hi Frank, Thanks for the peek at this neat piece of hardware. I find it very interesting that they would include Op Amps like this. I look forward to your followup with the MSP430FR2355. John
  • fmilburn
    fmilburn over 7 years ago in reply to jw0752 +4
    Hi John, Yes, I find it interesting as well. My knowledge of Op Amps is somewhat rudimentary so it is an opportunity to learn more about them. The FR2355 also has a built-in DAC and the Op Amps can be…
  • jc2048
    jc2048 over 7 years ago +3
    Good blog - I like this sort of thing. It's an interesting trend, building analogue parts into processors. ST have some similar parts with op amps, too. At a somewhat higher level, I suppose at a push…
Parents
  • DAB
    DAB over 7 years ago

    Nice Post.

     

    I will be following your progress with interest.

     

    DAB

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • DAB
    DAB over 7 years ago

    Nice Post.

     

    I will be following your progress with interest.

     

    DAB

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • fmilburn
    fmilburn over 7 years ago in reply to DAB

    Thanks for reading.  Let me know if I am not covering something that interests  you.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube