<?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 Using Codewarrior and PE on FRDM board, getting ADC and DAC to work in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195644#M2607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&amp;nbsp; In trying to get a simple ADC function to work using adc and PE typical example code, the code doesn't compile.&amp;nbsp; One variable doesn't seem to be defined.&lt;/P&gt;&lt;P&gt;If someone has a working PE example of a single channel conversion that would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; For a simple DAC example using CW and PE, when trying to execute &lt;/P&gt;&lt;P&gt;Error = dim_voltage_SetValue(MyDACDataPtr, 0xffff);&amp;nbsp; which is basically sending a value to the DAC output, the debugger goes to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PE_ISR(Cpu_Interrupt)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */&lt;/P&gt;&lt;P&gt;&amp;nbsp; PE_DEBUGHALT();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what causes this, and if its an unhandled interrupt how do I find out what caused it?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Dec 2012 19:15:30 GMT</pubDate>
    <dc:creator>steve_fae</dc:creator>
    <dc:date>2012-12-01T19:15:30Z</dc:date>
    <item>
      <title>Using Codewarrior and PE on FRDM board, getting ADC and DAC to work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195644#M2607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&amp;nbsp; In trying to get a simple ADC function to work using adc and PE typical example code, the code doesn't compile.&amp;nbsp; One variable doesn't seem to be defined.&lt;/P&gt;&lt;P&gt;If someone has a working PE example of a single channel conversion that would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; For a simple DAC example using CW and PE, when trying to execute &lt;/P&gt;&lt;P&gt;Error = dim_voltage_SetValue(MyDACDataPtr, 0xffff);&amp;nbsp; which is basically sending a value to the DAC output, the debugger goes to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PE_ISR(Cpu_Interrupt)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */&lt;/P&gt;&lt;P&gt;&amp;nbsp; PE_DEBUGHALT();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what causes this, and if its an unhandled interrupt how do I find out what caused it?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Dec 2012 19:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195644#M2607</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2012-12-01T19:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using Codewarrior and PE on FRDM board, getting ADC and DAC to work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195645#M2608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding ADC. I also used the typical example code and had no trouble compiling it. &lt;/P&gt;&lt;P&gt;Here's my code, it's almost the same as the example code. I only altered it to work with a static sample group (here group 1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD1_TResultData MeasuredValue[SAMPLE_GROUP_SIZE]; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDD_TDeviceData *MyADCPtr; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDD_TError Error;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyADCPtr = AD1_Init((LDD_TUserData *)NULL); /* Initialize the device */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;Error = AD1_SelectSampleGroup(MyADCPtr, 1U); &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; Error = AD1_StartSingleMeasurement(MyADCPtr); // Start continuous measurement&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; while (!AD1_GetMeasurementCompleteStatus(MyADCPtr)) {}; // Wait for conversion completeness&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; Error = AD1_GetMeasuredValues(MyADCPtr, (LDD_TData *)MeasuredValue);&amp;nbsp; // Read measured values&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; FsrReadings[1] = MeasuredValue[0];&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Dec 2012 21:50:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195645#M2608</guid>
      <dc:creator>filipsobczak</dc:creator>
      <dc:date>2012-12-01T21:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Codewarrior and PE on FRDM board, getting ADC and DAC to work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195646#M2609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks filipsobczak,&lt;/P&gt;&lt;P&gt;I can now compile.&amp;nbsp; So the input is ADC0_DP0 which is PTE20 on the FRDMKL board, but the value never changes, its always 0x5ac, whether I tie the pin to P3V3 [3v] or GND.&amp;nbsp; What did you set the reference to?&amp;nbsp; What might I be missing?&amp;nbsp; In addition I tied VREFH to P3V3 on FRDMKL board but VREFL isn't pinned out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks btw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Dec 2012 23:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195646#M2609</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2012-12-01T23:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Codewarrior and PE on FRDM board, getting ADC and DAC to work</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195647#M2610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid I can't help you anymore. My voltage referrence pins are VREFH and VREFL. And for further notice ADC0_DP0 is a differential channel. In single ended mode the PTE20 ADC input channel is ADC0_SE0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Dec 2012 11:37:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-Codewarrior-and-PE-on-FRDM-board-getting-ADC-and-DAC-to/m-p/195647#M2610</guid>
      <dc:creator>filipsobczak</dc:creator>
      <dc:date>2012-12-02T11:37:12Z</dc:date>
    </item>
  </channel>
</rss>

