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.

DAC Set-up on MSP430F5336

Other Parts Discussed in Thread: MSP430F5336, MSP430F5438A

Forgive my ignorance, as I am fairly new to programming microprocessors.

I have an MSP430F5336 that I am using on an MSP-EXP430F5438 development board, with CCS 5.1.

I am trying to set up the DAC to output a voltage and am having trouble getting anything out.  I've used some example code from another MSP430 and tried to modify it to fit my needs. Also, I'm unclear on which DAC I am setting up. Should I see an output on pin 3 (P6.6/DAC0), pin 4 (P6.7/DAC1), pin 7 (P7.6/DAC0), or pin 8 (P7.7/DAC1). I am pretty sure I've traced these all to headers or test points and checked them all.  The code is as follows:

#include <msp430.h>

void main(void)
{
  WDTCTL = WDTPW + WDTHOLD;                             // Stop watchdog timer
  REFCTL0 = REFON + REFMSTR;
  DAC12_0CTL0 = DAC12IR + DAC12AMP_5 +     
                 DAC12OPS + DAC12ENC + DAC12CALON;
  DAC12_0DAT = 0xFFF;                                      
    
  __bis_SR_register(LPM4_bits);                           // Enter LPM4
}

Thanks!

Nate

  • Nathan Schneck said:

    I have an MSP430F5336 that I am using on an MSP-EXP430F5438 development board, with CCS 5.1.

    I am trying to set up the DAC to output a voltage and am having trouble getting anything out. 

    Consider starting with the MSP-FET430U100C.  You should not use the MSP-FET430F5348 with a MSP430F5336 populated in its socket because they are not compatible.  For example, look at pins 87, 88, 89, 90 of both the MSP430F5336 and MSP430F5438A, both in PZ package.  Vcc and Vss do not match up.

  • I didn't notice that the pins weren't compatible there.  I will get the MSP-FET430U100C when I get a chance.  Strangely, everything seems to work fine.

    I realized my simple mistake was that I had my oscilloscope on AC coupling instead of DC coupling.  The output was working fine the whole time.

**Attention** This is a public forum