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