<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TWR-K60F120M DAC problems in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-DAC-problems/m-p/316113#M13896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. It was necessary to change the "voltage reference source" of DacLdd1 and DacLdd2 from "internal" to "external".&amp;nbsp; This got some output, but the peak voltage was quite low (a couple hundred millivolts)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. DAX_SetValue() seems to do a four bit right shift (&amp;gt;&amp;gt;4) of shorts/words to set the 12 bit DAC output.&amp;nbsp; Changing the "I" rollover point from 4095 to 65535 get me the 3.3V sawtooth I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps someone else down the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2014 19:13:43 GMT</pubDate>
    <dc:creator>acurtis</dc:creator>
    <dc:date>2014-06-09T19:13:43Z</dc:date>
    <item>
      <title>TWR-K60F120M DAC problems</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-DAC-problems/m-p/316112#M13895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My company is evaluating Kinetis chips for an new project.&amp;nbsp; I've just recently started working with the TWR-K60F120M tower kit via Kinetis Design Studio and have been quite successful so far (interfacing with UART, ADC, misc Timer configs, etc...); however, I am having trouble getting output from the DACs.&amp;nbsp; In KDS, I select the DAC component in the Components Library (DA1=DAC0, DA2=DAC1), use defauls (right justified/unsigned, enable on init, pin output enabled, etc...), generate the code and have adapted mainline code from the component&amp;nbsp; "Typical Usage"&amp;nbsp; help page (see below).&amp;nbsp; I receive no compilation errors and debugging shows that my code seems to be doing what I want...except I'm not getting any output...&amp;nbsp; I'm probing pins A32 (DAC0_OUT) and B32 (DAC1_OUT) on the edge connector, using TP17(GND) as my probe ground and I'm expecting to see a sawtooth, but no dice. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone had similar issues or provide some assistance with my problem?&amp;nbsp; Any feedback is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; word i = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (i==4095) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DA1_SetValue(&amp;amp;i);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Courier New;"&gt;DA2_SetValue(&amp;amp;i);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 17:29:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-DAC-problems/m-p/316112#M13895</guid>
      <dc:creator>acurtis</dc:creator>
      <dc:date>2014-06-09T17:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-K60F120M DAC problems</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-DAC-problems/m-p/316113#M13896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved my problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. It was necessary to change the "voltage reference source" of DacLdd1 and DacLdd2 from "internal" to "external".&amp;nbsp; This got some output, but the peak voltage was quite low (a couple hundred millivolts)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. DAX_SetValue() seems to do a four bit right shift (&amp;gt;&amp;gt;4) of shorts/words to set the 12 bit DAC output.&amp;nbsp; Changing the "I" rollover point from 4095 to 65535 get me the 3.3V sawtooth I expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps someone else down the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 19:13:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/TWR-K60F120M-DAC-problems/m-p/316113#M13896</guid>
      <dc:creator>acurtis</dc:creator>
      <dc:date>2014-06-09T19:13:43Z</dc:date>
    </item>
  </channel>
</rss>

