<?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: ADC K64 output in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629154#M37822</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;Please refer attached tested code, which using FRDM-K64F board and can get ADC0_DP1 &amp;amp; ADC0_DM1 differential ADC conversion result.&lt;/P&gt;&lt;P&gt;I am using KSDK v2.0 for FRDM-K64F software. The project default path is :&lt;/P&gt;&lt;P&gt;C:\Freescale\SDK_2.0_FRDM-K64F\boards\frdmk64f\driver_examples\adc16\polling&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Oct 2016 08:34:39 GMT</pubDate>
    <dc:creator>Hui_Ma</dc:creator>
    <dc:date>2016-10-17T08:34:39Z</dc:date>
    <item>
      <title>ADC K64 output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629153#M37821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'am using the ADC16 of the k64.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'am using &lt;SPAN&gt;ADC0_DP1/&lt;/SPAN&gt;&lt;SPAN&gt;ADC0_&lt;/SPAN&gt;&lt;SPAN&gt;DM1&amp;nbsp;as&lt;/SPAN&gt;&amp;nbsp;differential Analogic voltage inputs.&lt;/P&gt;&lt;P&gt;The problem that i'am always getting as result the same value (3.3v that is the Vref) even when i&amp;nbsp;change the input voltage value on the ADC0_DP1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define ADC16_BASEADDR &lt;STRONG&gt;ADC0&lt;/STRONG&gt; &amp;nbsp;//ID&lt;BR /&gt;#define ADC16_CHANNEL &lt;STRONG&gt;0u&lt;/STRONG&gt; //SC1A&lt;BR /&gt;#define ADC16_CHANNEL_NUMBER &lt;STRONG&gt;1u&lt;/STRONG&gt; //CHANNEL 1 (DP1)&lt;/P&gt;&lt;P&gt;#define VREF_BRD 3.300&lt;BR /&gt;#define SE_16BIT 65536.0&lt;BR /&gt;volatile uint32_t g_Adc16ConversionValue = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADC16_GetDefaultConfig(&amp;amp;adc16ConfigStruct);&lt;BR /&gt; ADC16_Init(&lt;SPAN&gt;ADC16_BASEADDR &lt;/SPAN&gt;, &amp;amp;adc16ConfigStruct);&lt;BR /&gt; ADC16_EnableHardwareTrigger(&lt;SPAN&gt;ADC16_BASEADDR &lt;/SPAN&gt;, false);&amp;nbsp;&lt;BR /&gt; if (kStatus_Success == ADC16_DoAutoCalibration(ADC0)) {&lt;BR /&gt; PRINTF("\r\nADC16_DoAutoCalibration() Done.");&lt;BR /&gt; } else {&lt;BR /&gt; PRINTF("ADC16_DoAutoCalibration() Failed.\r\n");&lt;BR /&gt; }&lt;BR /&gt; adc16ChannelConfigStruct.channelNumber = &lt;SPAN&gt;ADC16_CHANNEL_NUMBER &lt;/SPAN&gt;;&lt;BR /&gt; adc16ChannelConfigStruct.enableInterruptOnConversionCompleted = false;&lt;BR /&gt; adc16ChannelConfigStruct.enableDifferentialConversion = true; // enable diff mode&lt;BR /&gt; while (1)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;//start new&amp;nbsp;conversion&lt;BR /&gt; ADC16_SetChannelConfig(&lt;SPAN&gt;ADC16_BASEADDR &lt;/SPAN&gt;, &lt;SPAN&gt;ADC16_CHANNEL &lt;/SPAN&gt;, &amp;amp;adc16ChannelConfigStruct);&lt;/P&gt;&lt;P&gt;//wait conversion&lt;/P&gt;&lt;P&gt;while (0U == (kADC16_ChannelConversionDoneFlag &amp;amp;&amp;nbsp;ADC16_GetChannelStatusFlags(&lt;SPAN&gt;ADC16_BASEADDR &lt;/SPAN&gt;, &lt;SPAN&gt;ADC16_CHANNEL &lt;/SPAN&gt;)))&lt;BR /&gt; {&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;//read converted value in ADC0 result register&lt;BR /&gt; g_Adc16ConversionValue = ADC16_GetChannelConversionValue(&lt;SPAN&gt;ADC16_BASEADDR &lt;/SPAN&gt;, &lt;SPAN&gt;ADC16_CHANNEL&lt;/SPAN&gt;);&lt;BR /&gt; voltRead = (float)(g_Adc16ConversionValue * (VREF_BRD / SE_16BIT));&lt;BR /&gt; PRINTF("\r\nADC Voltage: %0.3f v\r\n", voltRead);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:54:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629153#M37821</guid>
      <dc:creator>ahmedhrabi</dc:creator>
      <dc:date>2016-10-12T16:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: ADC K64 output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629154#M37822</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;Please refer attached tested code, which using FRDM-K64F board and can get ADC0_DP1 &amp;amp; ADC0_DM1 differential ADC conversion result.&lt;/P&gt;&lt;P&gt;I am using KSDK v2.0 for FRDM-K64F software. The project default path is :&lt;/P&gt;&lt;P&gt;C:\Freescale\SDK_2.0_FRDM-K64F\boards\frdmk64f\driver_examples\adc16\polling&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 08:34:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629154#M37822</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2016-10-17T08:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: ADC K64 output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629155#M37823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx Hui_Ma i resolved my problem it was a hardware issue.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 17:04:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-K64-output/m-p/629155#M37823</guid>
      <dc:creator>ahmedhrabi</dc:creator>
      <dc:date>2016-10-19T17:04:45Z</dc:date>
    </item>
  </channel>
</rss>

