Internet Explorer is not a supported browser for TI.com. For the best experience, please use a different browser.
Video Player is loading.
Current Time 0:00
Duration 3:46
Loaded: 0%
Stream Type LIVE
Remaining Time 3:46
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected

Hi. Are you looking for a super easy way to monitor variable analog signals with extremely low power consumption? Well, then you've come to the right place. This video is part of our housekeeping MCU training series.

And here we demonstrate how to use the integrated Analog-to-Digital converter, or ADC, to interface with other devices on a board for applications, such as battery monitors or temperature sensors. In this specific example, we will show you how to use the integrated ADC to periodically sample incoming analog devices to wake up the MCU when a threshold is being crossed. You will need some type of signal generator to send a sine wave to the ADC input port of the microcontroller.

In the graphical user interface, which some may call G-U-I, or GUI, we will see that when the rising edge of the sine wave reaches the ADC comparison threshold, the LED status changes, meaning that the MCU woke up. And the ADC conversion results will begin transmitting real time to the GUI, according to a certain timer interval. You can use a slider on the GUI to change the ADC comparison threshold. Note that in this particular demo, the threshold is only updated on the hardware when the device is reset.

Simple modifications to the code can be made to add features, such as dynamically updating the threshold using the falling edge instead of the rising edge of the sine wave or putting the MCU back to sleep upon certain conditions. Let's take a closer look at the specific GUI design for this code example. We designed a graph that plots ADC values against time, status of the MCU, and the conversion value of the ADC.

On the bottom left, there is a text box displaying the ADC conversion value in real time. This value is synchronize with the red line displayed in the graph. In the middle is a slider to set the ADC comparison threshold.

Update to the threshold will be stored in the device's FRAM non-volatile memory. It does not become active until the next device reset. On the right, there is a small LED that represents the current status of the MCU, which you can see represented by the blue line in the graph as well.

The example code is developed in the MSP430FR2433 TI LaunchPad. TI LaunchPads put all the basic required hardware in one evaluation board, making your setup easy and clean. More detailed information can be found on TI.com.

For this particular example on the MSP430FR2433 LaunchPad, the P1.0 pin is used to control the LED that indicates whether the microcontroller is awakened by the ADC or not. The shown jumper must be connected. The P1.3 pin must be used as the input of the analog voltage signal. Connect your sine wave here.

The back channel UART-over-USB is used to communicate with the host GUI. Make sure these jumpers are connected. Here you can see the basic example code flowchart.

In the main program after some initialization, the microcontroller enters a low power mode and waits for an interrupt request that can be triggered by various peripherals. The first interrupt request comes from the ADC after the threshold is met. In the interrupt service routine or ISR, we turn on the LED and start one of the timers on the MCU.

It will continuously send ADC conversion data to the GUI until the device resets. The second one comes from the USCI_A0 serial port. When data is received from the host GUI, the MCU saves that ADC threshold data to FRAM. Note that this new threshold is not effective immediately and is used upon the next device reset.

Thanks for watching. Try the GUI for yourself, and check out our code example. The technical note is available to read for much deeper design details.

Here at TI, we make developing your solutions easy. We appreciate your time today. And happy engineering.

This video is part of a series