Hi,
I want to use DAC to see the current waveform in F28069M Laimchpad controller but there is no example programcan any one help me out writing code for DAC?
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.
Hi,
I want to use DAC to see the current waveform in F28069M Laimchpad controller but there is no example programcan any one help me out writing code for DAC?
There is no actual DAC on F28069 or the LaunchPad board. The board designer made provision for filtering up to four PWM channels to produce smoothed "DAC-like" outputs. There is an application note on the technique here: http://www.ti.com/lit/an/spraa88a/spraa88a.pdf
The user code would configure the PWM output (in this case PWM7A/B or PWM8A/B) to have the desired frequency and duty cycle. For an example, you could see the InitEPwmTimer() function in the code example "epwm_real-time_interrupts" in the header files for F28069 in controlSUITE:
C:\ti\controlSUITE\device_support\f2806x\v151\F2806x_examples_ccsv5\epwm_real-time_interrupts
You will have to select a PWM frequency to give you the accuracy you need based on the DAC filter.
Regards,
Richard
You could do that by making hand modifications to the board. The layout fixes the filters to PWM modules 7 & 8, so if you want to re-allocate them you have some track cutting and re-wiring to do. Alternatively you could add graft in new filters to other PWM pins. There is also an Experimenter's Kit available for this processor with prototyping area on the plug-in card:
http://www.ti.com/tool/tmdsdock28069
Unfortunately there isn't any example code explicitly to write to the Launchpad DACs. It looks like the designer made provision to do that, but didn't write any example code. The example I mentioned in the previous post is the closest I can point you towards. It's fairly straightforward to modify the code to use a different PWM module and then it's just a matter of changing the duty cycle in the CMPA register.
Regards,
Richard