<?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>Kinetis MicrocontrollersのトピックRe: [FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496144#M30855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David Lee,&lt;/P&gt;&lt;P&gt;&amp;nbsp; About the ADC sample code, please refer to the &lt;A href="http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/development-platforms-with-mbed/software-development-kit-for-kinetis-mcus:KINETIS-SDK?code=KINETIS-SDK&amp;amp;nodeId=0152109D3F1E8C1EF7&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab"&gt;KSDK1.3.0&lt;/A&gt;,&amp;nbsp; Kinetis SDK rev 1.x&lt;/P&gt;&lt;P&gt;&amp;nbsp; After you install the KSDK1.3.0, you will find the sample code in folder:C:\Freescale\KSDK_1.3.0\examples\frdmkl26z\driver_examples\adc16\iar&lt;/P&gt;&lt;P&gt;&amp;nbsp; But this sample code is just the sigle-ended, if you wan to use the differential, you need to configure the ADC channel as the kAdc16Chn0 to kAdc16Chn3, then configure the diffential mode:&lt;/P&gt;&lt;P&gt;chnConfig.diffConvEnable = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can try to modify the code, and associate with the &lt;A href="http://cache.nxp.com/files/microcontrollers/doc/ref_manual/KL26P121M48SF4RM.pdf?fpsp=1&amp;amp;WT_TYPE=Reference%20Manuals&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=pdf&amp;amp;WT_ASSET=Documentation&amp;amp;fileExt=.pdf"&gt;KL26 reference manual&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; About the KL16, actually, the ADC module is the same as the KL26, the KSDK is also supporting the KL16, but it don't have the sample code directly, you should refer to the KL26 sample code, and modify the header file and the according code for KL16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please contact with me!&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jingjing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 03 Mar 2016 03:17:22 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2016-03-03T03:17:22Z</dc:date>
    <item>
      <title>[FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496139#M30850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm using FRDM-KL26Z board with IAR EWARM 7.20.&lt;/P&gt;&lt;P&gt;I just bought this board and I'm new to it. I want to use the 16 bit ADC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm curious whether the MCU can accept negative voltages at the ADC input pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance,&lt;/P&gt;&lt;P&gt;I want to plug a sine wave&lt;/P&gt;&lt;P&gt;(-1 ~ 1 volts peak-to-peak which has frequency of 1000) using a function generator.&lt;/P&gt;&lt;P&gt;Can the MCU read the negative voltages and convert it?&lt;/P&gt;&lt;P&gt;If so, what configurations are needed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Best Regards, David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 12:43:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496139#M30850</guid>
      <dc:creator>david_lee</dc:creator>
      <dc:date>2016-03-01T12:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: [FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496140#M30851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David Lee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The KL26 can't accept negative voltage inputs for ADC, you can find it from the datasheet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/55598iB75C02353F7C573E/image-size/large?v=v2&amp;amp;px=999" role="button" title="20.jpg" alt="20.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So you should use the external circuit to keep your signal&amp;nbsp; between the VREFL - 31/32*VREFH.&lt;/P&gt;&lt;P&gt;&amp;nbsp; About the ADC sample code, please refer to the &lt;A href="https://nxp.flexnetoperations.com/control/frse/product?entitlementId=124015157&amp;amp;lineNum=1&amp;amp;authContactId=74322021&amp;amp;authPartyId=62635551"&gt;KSDK1.3.0,&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; After you install the KSDK1.3.0, you will find the sample code in folder:C:\Freescale\KSDK_1.3.0\examples\frdmkl26z\driver_examples\adc16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please contact with me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jingjing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Wed, 02 Mar 2016 03:17:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496140#M30851</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-03-02T03:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: [FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496141#M30852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="sine.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/55625i420B587BCB3635C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="sine.png" alt="sine.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, in this case, suppose there is a signal like "input 0" in the picture.&lt;/P&gt;&lt;P&gt;The sine wave is now biased with a DC voltage (1.5 Volts).&lt;/P&gt;&lt;P&gt;"Input 1" is a DC voltage source of 1.5 Volts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never used the "DIFF" mode before, so my ideas may have errors.&lt;/P&gt;&lt;P&gt;I know that the 16 bit ADC has sign bits, if I configure them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then can the ADC pins can read both "input 0" and "input 1" and use the diff mode&lt;/P&gt;&lt;P&gt;,in order to get rid of the DC component and read it as singed inputs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In other words, I'm curious why the ADC data register has a sign bit although the ADC peripheral cannot read negative voltages.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 03:35:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496141#M30852</guid>
      <dc:creator>david_lee</dc:creator>
      <dc:date>2016-03-02T03:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: [FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496142#M30853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David Lee,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now answer your questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actually, the sign bit of the ADC data register&amp;nbsp; is just for the diff mode, because just the diff mode has&amp;nbsp; a pair of external pins, DADPx and DADMx, when do ADC diff conversion, it actually convert the DADPx-DADMx,&amp;nbsp; if the DADPx higher than DADMx, the result is positive, if the DADPx is lower than DADMx, the result is negative, then it will use the sign bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Your problem is very simple to solve, you just need to use the 16 bit differential mode, connect "input 0" to DADPx, connect "input 1" to DADPMx, then you will get the diff data of your input0 and input1 in the ADC data register, and it should have the sign bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please contact with me!&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jingjing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 03 Mar 2016 02:27:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496142#M30853</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-03-03T02:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: [FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496143#M30854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, this was the feature I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will choose your answer after I check one more thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Freescale (now it's NXP) MKL series.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a example using DIFF mode?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Couldn't find them at the basic examples at IAR EWARM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also where can I get the latest SDKs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also use MKL16Z series, so I hope the SDK supports this chip as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 02:32:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496143#M30854</guid>
      <dc:creator>david_lee</dc:creator>
      <dc:date>2016-03-03T02:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: [FRDM-KL26Z] Can the MCU accept negative voltage inputs for ADC?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496144#M30855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David Lee,&lt;/P&gt;&lt;P&gt;&amp;nbsp; About the ADC sample code, please refer to the &lt;A href="http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/development-platforms-with-mbed/software-development-kit-for-kinetis-mcus:KINETIS-SDK?code=KINETIS-SDK&amp;amp;nodeId=0152109D3F1E8C1EF7&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab"&gt;KSDK1.3.0&lt;/A&gt;,&amp;nbsp; Kinetis SDK rev 1.x&lt;/P&gt;&lt;P&gt;&amp;nbsp; After you install the KSDK1.3.0, you will find the sample code in folder:C:\Freescale\KSDK_1.3.0\examples\frdmkl26z\driver_examples\adc16\iar&lt;/P&gt;&lt;P&gt;&amp;nbsp; But this sample code is just the sigle-ended, if you wan to use the differential, you need to configure the ADC channel as the kAdc16Chn0 to kAdc16Chn3, then configure the diffential mode:&lt;/P&gt;&lt;P&gt;chnConfig.diffConvEnable = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can try to modify the code, and associate with the &lt;A href="http://cache.nxp.com/files/microcontrollers/doc/ref_manual/KL26P121M48SF4RM.pdf?fpsp=1&amp;amp;WT_TYPE=Reference%20Manuals&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=pdf&amp;amp;WT_ASSET=Documentation&amp;amp;fileExt=.pdf"&gt;KL26 reference manual&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; About the KL16, actually, the ADC module is the same as the KL26, the KSDK is also supporting the KL16, but it don't have the sample code directly, you should refer to the KL26 sample code, and modify the header file and the according code for KL16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please contact with me!&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jingjing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 03 Mar 2016 03:17:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-KL26Z-Can-the-MCU-accept-negative-voltage-inputs-for-ADC/m-p/496144#M30855</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-03-03T03:17:22Z</dc:date>
    </item>
  </channel>
</rss>

