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.

DAC0

Other Parts Discussed in Thread: MSP430F6638

I am using this below code and it says that i can see my output on DAC0 . And i am confused about where to see the output. I mean on which pin. I Look at the data sheet and it says DAC0 at Pin 3 and Pin7. So should i look for the output at pin 3 or 7?? The chip is MSP430F6638IPZ.

#include <msp430f6638.h>

 

void main(void)

{

  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer

 

  // AVcc is used as reference, calibration on, DAC on

  DAC12_0CTL0 = DAC12IR + DAC12SREF_1 + DAC12AMP_5 + DAC12CALON;

  DAC12_0CTL0 |= DAC12ENC;                  // Enable DAC12

  DAC12_0DAT = 0x7FF;                       // ~1.5V

     

  __bis_SR_register(LPM4_bits);             // Enter LPM4

}

Thanks,

Lakshmi Polusani

  • Lakshmi Polusani said:
    So should i look for the output at pin 3 or 7??

    Before asking - did you try any?

  • Lakshmi Polusani said:
    I Look at the data sheet and it says DAC0 at Pin 3 and Pin7

    Not only DAC0: "P6.6/CB6/A6/DAC0" and "P7.6/CB10/A14/DAC0"

    From users guide:

    Table 30-4. DAC12_xCTL0 Register Description
    Bit  Field            Type Reset   Description
    15  DAC12OPS RW   0h        DAC output select
                                                  0b = DAC12_x channel output on Pm.y
                                                  1b = DAC12_x channel output on Pn.z

    From Device Datasheet:

    Table 61. Port P6 (P6.0 to P6.7) Pin Functions

    P6.6/CB6/A6/DAC0 - DAC0 - DAC12OPS=0

    Table 63. Port P7 (P7.4 to P7.7) Pin Functions

    P7.6/CB10/A14/DAC0 - DAC0 - DAC12OPS=1

**Attention** This is a public forum