This workshop will overview some microcontroller topics using the MSP430 microcontroller. You can access this workshop page from https://tinyurl.com/timspworkshop2021 for reference.
Agenda
- Overview of MCUs and MSP
- The MSP Ecosystem
- MSP Housekeeping functions
- TI Resource Explorer
- MSP430FR2355 LaunchPad out of box
- MSP Academy Overview and Examples
Welcome to the MSP430 academy. The DAC module is a voltage-output digital-to-analog converter (DAC). This module can output an analog signal external for control or reference. This academy will demo the usage of DAC in MSP430FR2355 and output a positive ramping voltage on a GPIO pin where it can be measured by a multimeter.
Not all MSP430 families include a DAC and those that do may have different variants. This academy uses MSP430Ware register level code examples from MSP430Ware and the tasks use MSP430FR2355 as an example to show how to output voltage from DAC.
Lab Examples
Use the guide on MSP Academy
https://dev.ti.com/tirex/explore/node?node=AHExfGU-vD7wB4m0FjiVfA__IOGqZri__LATEST
Summary
At the end of this lab, you should now be able to:
- Understand different DACs in different MSP430 family
- Understand how to configure SAC to DAC mode
Introduction
This lab introduces the integrated Operational Amplifier (OpAmp) module on MSP MCUs. It demonstrates the implementation of OpAmp circuits using the MSP-EXP430FR2355 and its integrated Smart Analog Combo (SAC) modules in DAC and Non-inverting PGA modes which can be used in applications requiring signal generation and amplification.
This lab uses register level code examples from MSP430Ware and has 3 tasks consisting of the following activities:
- Setup MCU Opamp in DAC mode with Timer trigger (basic signal generator, modify output)
- Setup MCU Opamp in Non-inverting PGA mode (basic amplifier, modify gain)
- Combine DAC mode OpAmp with Non-inverting PGA mode OpAmp and compare against TINA simulation.
In this lab, you will be using an MSP430FR2355 LaunchPad. Two of the MSP430FR2355 Smart Analog Combos (SAC) will be internally connected together so no external wiring is required. This makes it possible to generate and amplify a signal with no additional hardware required. The architecture of the configurable SAC can be seen in the image below. As can be seen, the inputs to the SAC OpAmp can be configured for an integrated DAC, external pins, programmable gain feedback, or other OpAmp outputs. Each OpAmp can be configured for general-purpose, buffer, DAC, inverting, or non-inverting mode.
In this lab, we'll be focused on a DAC mode configuration(with OpAmp in follower mode) and a Non-inverting PGA mode configuration. The SAC configurations for DAC mode is depicted below. In this configuration, the DAC output is connected to the positive input of the OpAmp, while the negative input is connected to the output of the OpAmp.
The non-inverting PGA mode SAC configuration is depicted below. In this configuration, the positive input of the OpAmp is connected to an external pin(or another OpAmp) and the negative input of the OpAmp is connected between a feedback resistor and another resistor connected to the ground. The gain of the OpAmp is determined by the resistor values which are configured via the SAC PGA register.
The non-inverting OpAmp configuration is depicted below along with the equation describing the relationship between Vout and Vin. As can be seen, Rf and R2 form a voltage divider for the feedback loop.
Solving for the ratio of Vout/Vin we get the following for the gain:
To dynamically adjust the gain of this OpAmp for applications requiring Automatic Gain Control(AGC), we can modify the ratio between Rf and Rin via the SAC PGA register to ensure that the amplified output isn't clipped.
Lab Examples
Use the guide on MSP Academy
Challenge
Congratulations on making it to the end! Now, if you are up to the challenge, think about how you might modify your AGC code to adapt to input signals which have time varying amplitudes at some known frequency. In order to quickly evaluate other possible OpAmp configurations with your platform, please download the MSP430 Analog Config utility.
Summary
At the end of this lab, you should now be able to:
- Have a fundamental understanding how integrated OpAmps can be configured for signal generation and amplification.
- Have a working understanding of the differences seen between TINA simulation and platform results for MCU integrated OpAmps.
- Re-configure OpAmps for different input and output connections.
- Make a working AGC Non-inverting PGA.
This lab introduces the Universal asynchronous receiver-transmitter (UART). It demonstrates implementing UART communication using the MSP-EXP430FR2355 and its integrated enhanced Universal Serial Communication Interface (eUSCI) module in UART mode which can be used in applications requiring serial communications with other microcontrollers (MCUs) or a PC.
This lab uses register level code examples from MSP430Ware and has 3 tasks consisting of the following activities:
- Setup MCU in loopback mode (fundamentals of configuring the registers)
- Setup MCU to echo characters from a PC (basic communication with PC, modify baud rate)
- Create functional UART transceiver (MCU responds with message to terminal application on PC)
This lab introduces fundamental UART functionality on MSP MCUs. Only the UART initialization, operation and interrupt handling portion of the code examples are the focus of this training academy. Other portions of the code example related to the MCU's clock and GPIO initialization are presented for context and are left up to the reader to investigate separately through topic-specific TI Academy trainings.
In this lab, you will be using an MSP430FR2355 LaunchPad. One of the MSP430FR2355 UART peripherals is connected to the LaunchPad's programmer/debugger backchannel UART, which provides a virtual serial port connection to the PC. This makes it possible to send and receive bytes with no additional hardware required.
Lab Examples
Use the guide on MSP Academy
https://dev.ti.com/tirex/explore/node?node=APp7.oREwBGnUCCkFPP9XQ__IOGqZri__LATEST
Challenge
Congratulations on making it to the end! Now, if you are up to the challenge, think about how you might send one message to the PC when your turn the LED on and a different message when you turn the LED off?
Summary
At the end of this lab, you should now be able to:
- Have a fundamental understanding how the a UART transmits and receives bytes
- Familiar with handling UART interrupt events
- Re-configure baud rates
- Make a working transceiver
ADC wake
Follow the guide on MSP Academy
https://dev.ti.com/tirex/explore/node?node=AKzqA0IGyLAD2nwRN2jyTA__IOGqZri__LATEST
Timers
Follow the guide on the MSP Academy
https://dev.ti.com/tirex/explore/node?node=AHdCudnGEVIf6CmHM4TrRg__IOGqZri__LATEST
I2C
Follow the guide on MSP Academy
https://dev.ti.com/tirex/explore/node?node=ANn42uDC4eb.Ph7o71nKTg__IOGqZri__LATEST
Apply to TIInterested in applying for TI internships and Full-time opportunities? Check out what's next at careers.ti.com. Be prepared for interview season at the beginning of each semester. Review your fundamentals from circuits and other classes. Apply online to as many opportunities as you can and visit TI at the career fairs at your school.
https://careers.ti.com/working-at-texas-instruments/
https://careers.ti.com/hiring-interview-process-2/
Comments
Please log in or sign up to comment.