This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5739: How to set up ADC on MSP430

Part Number: MSP430FR5739

Hi,

I'm attempting to implement ADC inputs on 4 MSP430 pins. I figured out how to do GPIO pins by using the PxDIR registers to set outputs, and now I need to set some ADC inputs.

I've looked up tutorials, but many make use of the "ADC10AE0" register, which doesn't appear to exist on this variant of the MSP430.

Could anyone talk me through how I'm supposed to attach an ADC input to a particular pin? I want to be able to take inputs on P1.1, P1.2, P1.3, and P1.4.

I've tried looking at the code examples in the CCS Resource Explorer, but I don't understand what each control register is for. I don't see exactly where it defines what pin is being sampled, for example. Also, many of the examples make use of interrupts, which is not a capability I need. I just need to read an analog value. That's literally it.

I'm used to working in Arduino where it's as simple as analogRead(pin), so this is all very new to me so I'd appreciate an explanation as simple as possible. Even if someone could give some search terms that would lead me to the proper ADC documents (which don't use the ADC10AE0 register) that would be a big help.

Thank you!

  • Hello Thomas,

    There are several different ADC 10 example projects in CCS resource explorer based on your project requirement with detail comments that should help you to understand how to setup the ADC and how to configure the pins. And as far as the interrupts, you do not have to use interrupts, the example projects uses interrupts for different purpose like setting the device to low power mode, using DMA or turn on the LEDs.

    I just want to make sure you are looking at the examples at the right place. 

    Thanks,

    Yiding

**Attention** This is a public forum