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.

interfacing of msp430g2231 with digital to analog converter..

Other Parts Discussed in Thread: MSP430G2231, DAC7811, MSP430F449

hi all.

i did the coding for adc10 to read 5 analog inputs in msp430g2231 and i did the average for the 5inputs and i stored the averaged value in a memory location.. now i need to know is there any possiabilty in msp430g2231 to interface the ad7541a(digital to analog converter)?? or else wat i have to do to convert the averaged  digital value in to the analog value .

  • Hi Karthik,

    I'm sorry but connecting the MSP430G2231 to a 12-bit parallel DAC won't be possible, there are not enough pins on the MSP430 to control the device.   You could potentially use one or two channels of the ADC10 on the MSP430G2231 and then use the USI peripheral to talk with our DAC7811 (also a 12-bit multiplying DAC) which has a serial interface.

  • thanks for your reply tom...

  • i am having one more doubt . is there any possibility to out a digital value to the port.. if it  is possible means please send some sample codes..

  • Hi Karthik,

    Yes, you can!  Assuming you are going to stick with a parallel DAC, lets say you find another MSP430 with more pins, something like the MSP430F449 for example.  If you wanted to wire port 3, bits 0-7 to the LSB through bit 7 of the DAC you would need to set the port pins to outputs.  That is done with a line like this:

    P3DIR = 0xFF;

    To output a digital value to the entire port, you use a line like this:

    P3OUT = 0xAA;

    That would set port 3 bits 0-7 with a pattern of 01010101.  I might have some code that operates a parallel DAC in the archives somewhere - if I do I will post it to our code example page under the Design Notes tab on this forum.