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.

MSP430F169 - Trigger ADC1 through timer A then send output to DAC1 (sample code please)

Other Parts Discussed in Thread: MSP430F169

Hello,

I'm trying to evaluate an MSP430F169 by simply reading a value from ADC1 and writing the value to DAC1. I've tried a few different approaches but I continue to see all kinds of jitter (so I'm thinking that I'm not doing it correctly). Can someone please give me a simple peace of code that will do this correctly (triggering ADC1 through timer A)?

P.S. I'm a little confuesed as to why all of the ADC examples in the zip file provided by TI are for static measurements that are to be run, then halted, then a register read. I'm I the only one who wants to make a quick dynamic evaluation - can't be? (I must be missing something here?)

Thank you in advance,

Jim

  • There are code examples for the various family members of the MSP430 which should be a good starting point for you.  You can find them by going to the Microcontroller Home page and then select the "Code Examples" link under MSP430.  Select the examples associated with the MSP430F16x.

    In this set of very simple code examples, you will find a variety associated with the ADC and DAC.

    In particular, fet140_adc12_11.c uses the TimerA as the trigger for the ADC.  The results are stored into an array in the interrupt service routine.  You can certainly modify this to write it to the DAC.

    The fet140_dac12_01.c sets up the DAC to output a constant voltage, but you can certainly incorporate this example into the one above to take the results from the ADC and write to the DAC.

**Attention** This is a public forum