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.

TMS320F280049C: DAC for TMS320F28004x Piccolo Microcontrollers

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

I am looking at the technical reference manual for TMS320F28004x Piccolo Microcontrollers (Literature Number: SPRUI33A).

Referring to 15.1 Buffered Digital-to-Analog Converter (DAC) Overview, which states "The buffered DAC is a general-purpose DAC that can be used to generate a DC voltage in addition to AC waveforms such as sine waves, square waves, triangle waves and so forth."

Can the AC waveforms be set up / configured via registers? I am hoping the AC waveform, such as sine or ramp, can be set up in hardware configuration to let the DAC output waveform be autonomous, rather than constantly updating the DAC value in software to create the desired AC waveform. Section 15.1 does not mention how to generate the AC waveforms.

Thank you.

Literature Number: SPRUI33A

  • Hi,

    You can refer the example from F2837xd at "<C2000Ware>\device_support\f2837xd\examples\cpu1\buffdac_sine" to generate sine wave.
    It can be ported to F28004x with using header files of F28004x. Try and let me know if you face any issues in using the example.

    The example uses "SGEN" library from C2000Ware to output the desired value to generate the required waveform.
    "SGEN" library uses C2000 FPU funtionality to provide such precise values which can be used to generate the waveform. It is already using a hardware capability.

    But regarding your quesiton on "setup in hardware configuraiton to let the DAC output waveform be autonomous", I will check with DAC expert and will let you know.

    Thanks,
    Katta
  • Hi SRW,

    To add to what Katta just said, we do have a CPU hands-off waveform generation example for the DAC. You will find this in the same directory as "buffdac_sine_dma". The example creates a sine table in memory and uses the DMA to read from the sine table and write to the DAC. No CPU interaction required after the sine table is created.
  • Hi SRW,

    Do you have any further inquiries on this?
  • Thank you both for the quick response. I believe I have my answer, but waited a little longer for Katta since she said "I will check with DAC expert and will let you know." It still hasn't been very long since my original post, so normally I wouldn't try to rush it, but I am getting multiple automated emails from TI encouraging me to mark this as resolved.

    From Katta's original response, and Frank's follow on, I do believe my answer is confirmed that any DAC waveforms must be implemented in software. 

  • SRW,

    Just to clarify, if you use the DMA, the DAC waveform generation is not through software, it's through hardware (DMA directly to DAC, no CPU intervention).
  • Thanks for the clarification Frank. This is a great feature to have in the 280049, and I think can be used to accomplish the same thing.

    The motivation for my original post came from the ramp feature for the reference DAC for the analog comparators. I noticed this ramp was not included on the buffered DAC, so I was looking to see if something similar existed, because I am looking into the possibility of generating a ramp on the DAC with a variable slope depending on operating conditions.

    I had not looked into using the DMA to do this, thank you for pointing that out.
  • Glad to help. I understand where you are coming from in terms of the ramp generator being a dedicated hardware for the CMPSS.