<?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: Sine Wave To DAC Using FRDM K64 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659230#M40433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Olivia,&lt;/P&gt;&lt;P&gt;I suppose that you want to output a sine waveform on the DAC pin, if it is the case, the general method is to use PDB generate trigger signal to trigger DAC, so that the DAC can output sine waveform, the frequency of the sine waveform is only dependent on the PDB setting.&lt;/P&gt;&lt;P&gt;Regarding your current issue, I suppose that the DAC only output the last value of the sine table, which is 1997*Vref/4096=(3.3V*1997)/4096=4.8mV. In other words, you can not use a loop to output the sine table.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Feb 2017 02:39:32 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2017-02-04T02:39:32Z</dc:date>
    <item>
      <title>Sine Wave To DAC Using FRDM K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659226#M40429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using FRDM K64f to generate a sine wave and give it as the input of DAC and receive a signal with 4.8mv amplitude at the DAC OUT. I generated a sine wave signal and gave to DAC input and received a sine wave at the DAC OUT with 1.65 v &amp;nbsp; amplitude . I am using processor expert with IAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to reduce the amplite of the signal to 4.8mv .How is it possible with the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const LDD_DAC_TData SinusOutputData[SINUS_LENGTH] = {&lt;BR /&gt; 2047U, 2097U, 2147U, 2198U, 2248U, 2298U, 2347U, 2397U, 2446U, 2496U, 2544U, 2593U, 2641U, 2689U,&lt;BR /&gt; 2737U, 2784U, 2830U, 2877U, 2922U, 2967U, 3012U, 3056U, 3099U, 3142U, 3184U, 3226U, 3266U, 3306U,&lt;BR /&gt; 3346U, 3384U, 3422U, 3458U, 3494U, 3530U, 3564U, 3597U, 3629U, 3661U, 3691U, 3721U, 3749U, 3776U,&lt;BR /&gt; 3803U, 3828U, 3852U, 3875U, 3897U, 3918U, 3938U, 3957U, 3974U, 3991U, 4006U, 4020U, 4033U, 4044U,&lt;BR /&gt; 4055U, 4064U, 4072U, 4079U, 4084U, 4088U, 4092U, 4093U, 4094U, 4093U, 4092U, 4088U, 4084U, 4079U,&lt;BR /&gt; 4072U, 4064U, 4055U, 4044U, 4033U, 4020U, 4006U, 3991U, 3974U, 3957U, 3938U, 3918U, 3897U, 3875U,&lt;BR /&gt; 3852U, 3828U, 3803U, 3776U, 3749U, 3721U, 3691U, 3661U, 3629U, 3597U, 3564U, 3530U, 3494U, 3458U,&lt;BR /&gt; 3422U, 3384U, 3346U, 3306U, 3266U, 3226U, 3184U, 3142U, 3099U, 3056U, 3012U, 2967U, 2922U, 2877U,&lt;BR /&gt; 2830U, 2784U, 2737U, 2689U, 2641U, 2593U, 2544U, 2496U, 2446U, 2397U, 2347U, 2298U, 2248U, 2198U,&lt;BR /&gt; 2147U, 2097U, 2047U, 1997U, 1947U, 1896U, 1846U, 1796U, 1747U, 1697U, 1648U, 1598U, 1550U, 1501U,&lt;BR /&gt; 1453U, 1405U, 1357U, 1310U, 1264U, 1217U, 1172U, 1127U, 1082U, 1038U, 995U, 952U, 910U, 868U,&lt;BR /&gt; 828U, 788U, 748U, 710U, 672U, 636U, 600U, 564U, 530U, 497U, 465U, 433U, 403U, 373U,&lt;BR /&gt; 345U, 318U, 291U, 266U, 242U, 219U, 197U, 176U, 156U, 137U, 120U, 103U, 88U, 74U,&lt;BR /&gt; 61U, 50U, 39U, 30U, 22U, 15U, 10U, 6U, 2U, 1U, 0U, 1U, 2U, 6U,&lt;BR /&gt; 10U, 15U, 22U, 30U, 39U, 50U, 61U, 74U, 88U, 103U, 120U, 137U, 156U, 176U,&lt;BR /&gt; 197U, 219U, 242U, 266U, 291U, 318U, 345U, 373U, 403U, 433U, 465U, 497U, 530U, 564U,&lt;BR /&gt; 600U, 636U, 672U, 710U, 748U, 788U, 828U, 868U, 910U, 952U, 995U, 1038U, 1082U, 1127U,&lt;BR /&gt; 1172U, 1217U, 1264U, 1310U, 1357U, 1405U, 1453U, 1501U, 1550U, 1598U, 1648U, 1697U, 1747U, 1796U,&lt;BR /&gt; 1846U, 1896U, 1947U, 1997U&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (i = 0; i &amp;lt; SINUS_LENGTH; i++) {&lt;BR /&gt; &lt;BR /&gt; //SinusOutputData[i] = 4096-SinusOutputData[i];&lt;BR /&gt; DA0_SetValue(MyDacPtr, (SinusOutputData[i])); /* Set converter output */&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 09:14:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659226#M40429</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2017-02-01T09:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sine Wave To DAC Using FRDM K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659227#M40430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for (i = 0; i &amp;lt; SINUS_LENGTH; i++) {&lt;BR /&gt; &lt;BR /&gt; //SinusOutputData[i] = 4096-SinusOutputData[i];&lt;BR /&gt; DA0_SetValue(MyDacPtr, (SinusOutputData[i]&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;/344&lt;/STRONG&gt;&lt;/SPAN&gt;)); /* Set converter output */&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 14:21:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659227#M40430</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-02-01T14:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sine Wave To DAC Using FRDM K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659228#M40431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your answer. Now I am &amp;nbsp;getting 7.5mv at the DAC OUT when vref is external (vdd) and 2.2mv when vref is internal .Can you tell me how do you calculated this value. I have to get 4.8mv at the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2017 04:48:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659228#M40431</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2017-02-02T04:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sine Wave To DAC Using FRDM K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659229#M40432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0.0048/1.65 = 1/&lt;STRONG&gt;344&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is too high, it is probably noise - you can simply try dividing more by&lt;/P&gt;&lt;P&gt;4.8/7.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving 1/&lt;STRONG&gt;538&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it doesn't react as much as you expect it is really noise that you are measuring and limiting the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2017 19:28:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659229#M40432</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-02-02T19:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sine Wave To DAC Using FRDM K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659230#M40433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Olivia,&lt;/P&gt;&lt;P&gt;I suppose that you want to output a sine waveform on the DAC pin, if it is the case, the general method is to use PDB generate trigger signal to trigger DAC, so that the DAC can output sine waveform, the frequency of the sine waveform is only dependent on the PDB setting.&lt;/P&gt;&lt;P&gt;Regarding your current issue, I suppose that the DAC only output the last value of the sine table, which is 1997*Vref/4096=(3.3V*1997)/4096=4.8mV. In other words, you can not use a loop to output the sine table.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Feb 2017 02:39:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Sine-Wave-To-DAC-Using-FRDM-K64/m-p/659230#M40433</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-02-04T02:39:32Z</dc:date>
    </item>
  </channel>
</rss>

