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.

Using VREF+

Other Parts Discussed in Thread: MSP430F5437

Hi,

I'm using the new MSP430F5437 and I'm trying to write a simple application that enables the 1.5V VREF+ signal on the MSP430. I want to use this signal in an op amp circuit to create a DC offset on an analog signal. I've read through the documentation, but I can't figure out how to turn the 1.5VDC reference on. My code is as follows:

 

P5SEL = 0x03;    // Enable Vref+ and Vref-
P5DIR = 0x03;   // Make Vref+ and Vref- output direction
ADC12CTL0 = 0x20; // REF2_5V = 0, ADC12REFON = 1

 

When I measure the output voltage on the Vref+ pin (P5.0), it still measures 0V, not 1.5V.

Am I missing a step?

 

thanks

Michael

  • Based on my read of the MSP430F5437 datasheet (SLAS612) page 69 provides an illustration of the use of P5.0 and P5.1 for Vref+ and Vref-.  The table indicates how to bring the reference voltage provided to the ADC12 out to the outside world.

    Pin      Function        P5DIR    P5SEL     REFOUT
    P5.0    P5.0 I/O        0: IN     0            X
                                  1: OUT  0            X
              VeREF+          X          1            0
              VREF+           X           1            1

    ADC12CTL2 |= 0x02 ; // REFOUT = 1

  • Brandon,

    Thanks for the reply. The "ADC12CTL2 | = 0x02;" was what I was missing. I didn't notice you had to set ADC12REFOUT, when I first read the datasheet - thanks.

    It is working now. I can set both voltages on the VREF+ pin.

     

    Although - I did notice the voltages were not at the exact expected values. I am reading 1.470V and 2.456V for the "1.5V" and "2.5V" levels, respectively.

    I am powering from the FET programmer, right now, which is providing 3.047VDC.

    This is about a 30mV offset. Is there a way to adjust this to get it closer to the expected levels?

     

    thanks

    Michael

     

  • mgcorr said:

    Although - I did notice the voltages were not at the exact expected values. I am reading 1.470V and 2.456V for the "1.5V" and "2.5V" levels, respectively.

    Michael,
    Please take a look at page 58 of the MSP430F5437 datasheet (SLAS612).  The bottom of that page discusses the 12-bit ADC built-in reference and the "typical" values which match your observed measurements.

    I would agree the register bit suggests 1.5V and 2.5V, which could certainly lead to the potential confusion.

  • Ah, yes. Reading the datasheet more thoroughly always helps - thanks.

     

    Ok - well I guess now I know I'm getting the expected performance.

     

    thanks

    Michael

**Attention** This is a public forum