For example i will not use comparator (value will be calculated inside, and change time by time),
debugginglifeshould i enable comparator
In a word: yes.
The DAC won't work unless you enable the Comparator module
I would like to get analog DC voltage output by pushing data into DAC DATA register.
Just store the 12-bit value in DAC1DATH.
Tested on my dsPIC33CH128MP508 Curiosity board.
Footnote: There is a note in the Data Sheet that, "DAC input frequency needs to be 500 MHz.
Your setup can give output when you enable the Comparator module (with clock frequency equal to 90 MHz), but I tried to comply with that note as follows:
I set up the AUX PLL for 500 MHz and used that as the CMP1 clock source. MCC gave a warning that "Input clock frequency should be less than 400 MHz.
" It worked in spite of the warning. Just for kicks I set the prescaler to 1:2 so that the input frequency is 250 MHz. No more warning from MCC. Couldn't tell the difference (on a 'scope) with my simple DDS project but I did not attempt any precise measurements (mild external filtering cleans it up enough for my test purposes). I'm guessing that there might be a Very Good Reason to set it up the way the Data Sheet says, but I didn't follow through beyond my immediate needs. Go figure...
I guess "needs to be
" doesn't mean "must be
." At least for a DC mode DAC application. (What a peculiar way of wording the note.)
It might make a difference for more sophisticated applications that use the slope generator and pulse stretching, etc. (like the power supply application in the Curiosity demo program). For my testbench application, the DAC sample clock is 100 kHz (10 us sample period).
post edited by davekw7x - 2019/08/13 12:37:48