SLAA705A July 2016 – November 2019 MSP430FR2310 , MSP430FR2311
In sensing applications, operational amplifiers are often needed to condition (for example, to amplify and filter) the analog sensor output so that it can be properly sampled by the analog-to-digital converter (ADC) on the microcontroller (MCU). This application report provides a guide to set up the integrated operational amplifiers (TIA and SAC_OA) on the MSP430FR2311 MCU. Examples are provided for using the integrated operational amplifiers as a transimpedance amplifier for current sensing applications. Considerations for low-power operation are also discussed.
LaunchPad, Code Composer Studio, EnergyTrace are registered trademarks of Texas Instruments.
All other trademarks are the property of their respective owners.
In many sensing applications, the raw analog output of a sensor must be amplified, filtered, or converted to a voltage to be properly sampled by the analog-to-digital converter (ADC). The digital stream from the ADC is then processed by an MCU to extract the useful information. One example is a transimpedance amplifier. The transimpedance amplifier converts the output current from a sensor to a voltage that is readable by an ADC. Stand-alone operational amplifiers (OAs) are normally used to perform the task. To reduce the cost and design complexity, two configurable operational amplifiers are implemented on MSP430FR2311 mixed signal microcontroller for single chip designs.
This application report describes how to set the MSP430FR2311 control registers to use the integrated OAs as general-purpose OAs. The transimpedance amplifier for the current sensing applications is used as examples to demonstrate the operation. One complete current sensing system example is discussed with consideration for low-power applications. The examples are verified with the MSP430FR2311 LaunchPad™ development kit.
The MSP430FR2311 includes two integrated OAs:
There are two major differences between those two OA modules. The first difference is the input bias current. On the TSSOP16 package, there is a dedicated pin for the negative input of the TIA module, and the input bias current is much lower compared to input pins that are multiplexed with other functions. The second difference is input voltage range. The inputs of the TIA module support only half-rail voltage, while the inputs of the SAC_OA module support rail-to-rail voltage.
In applications that require wider bandwidth, a second stage of OA is required. The integrated OAs on the MSP430FR2311 make design simple with the internal connections between the two OAs and ADC. The user can choose the TIA module for the first stage and the SAC_OA as the second stage. The TIA output is internally connected to the SAC_OA input. The SAC_OA output is internally connected to the ADC input. No external connection is needed, which not only reduces cost but also improves signal quality. Although the OA outputs are internally connected to next stage of processing, they must be routed to the external pins because the external feedback network is required.
The electrical characteristics of the integrated OAs can be found in the MSP430FR2311 data sheet.
For more details about how to design with operational amplifiers, refer to the following application reports:
An Applications Guide for Op Amps
Handbook of Operational Amplifier Applications
For more details about transimpedance amplifiers, refer to the following application reports:
Transimpedance Amplifiers (TIA): Choosing the Best Amplifier for the Job
Transimpedance Considerations for High-Speed Operational Amplifiers
The user must verify the sensor specifications and working conditions for application so that the integrated OAs are configured properly.
This section describes how to set up the MSP430FR2311 control registers to enable the integrated operational amplifiers as general-purpose operational amplifiers. There are two steps in setting up an integrated OA to work as a general-purpose OA.
Figure 1 shows the block diagram of SAC_OA. The black squares are the control bits in the SAC0OA register. In addition to an external pin, the output of the SAC_OA is internally connected to inputs of the compare (eCOMP) and analog-to-digital converter (ADC) modules for further processing. The internal connections save pins so that signal is not routed out and then back into the device, which also can be advantageous in respect to noise. The control registers of the eCOMP and ADC modules must be configured to use this signal as input.
To enable SAC_OA as a general-purpose operational amplifier, the OAEN, PMUXEN, and NMUXEN bits must be set in the SAC0OA register. Configure the OAPM bit to select high-speed or low-speed mode according to the application requirements. The high-speed mode enables faster slew rate at the cost of higher power consumption. The PSEL bits can be configured to connect the positive input to the external pin or TIA output.
Figure 2 shows the definition of the control register SAC0OA. For example, a value of 0x0588 must be written to the SAC0OA register to set up SAC_OA inputs to external pins and set SAC_OA in low-power low-speed mode.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
Reserved | SACEN | OAPM | OAEN | ||||
r0 | r0 | r0 | r0 | r0 | rw-(0) | rw-(0) | rw-(0) |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
NMUXEN | Reserved | NSEL | PMUXEN | Reserved | PSEL | ||
rw-(0) | r0 | rw-(0) | rw-(0) | rw-(0) | r0 | rw-(0) | rw-(0) |
The I/O pins on MSP430FR2311 are multiplexed with multiple module functions. The GPIO port control registers P1SEL0 and P1SEL1 must be configured to enable the SAC_OA function on the external pins. Figure 3 and Figure 4 show the definition of the P1SEL0 and P1SEL1 registers, respectively. Bits 2, 3, and 4 must be set in both the P1SEL0 and P1SEL1 registers to enable operational amplifier function on the external I/O pins.
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
P1SEL0 | |||||||
rw-0 | rw-0 | rw-0 | rw-0 | rw-0 | rw-0 | rw-0 | rw-0 |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
P1SEL1 | |||||||
rw-0 | rw-0 | rw-0 | rw-0 | rw-0 | rw-0 | rw-0 | rw-0 |
As an example, use the code sequence in Example 1 to enable SAC_OA in low-speed mode with MSPWare driverlib APIs. In this example, all SAC_OA pins are routed to external I/O pins.