<?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のトピックCan the Kinetis DAC0_OUT Pin be used as a Digital Output?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511507#M32319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm just putting together a list of pin resources for my product and, no surprises, I'm running out of IO.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use DAC0_OUT as an Digital Output?&amp;nbsp; For the application, the operation does not need to be particularly fast nor high current (1mA max).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any example code (I will be working with KSDK2) would be very much appreciated.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2016 15:40:36 GMT</pubDate>
    <dc:creator>myke_predko</dc:creator>
    <dc:date>2016-03-29T15:40:36Z</dc:date>
    <item>
      <title>Can the Kinetis DAC0_OUT Pin be used as a Digital Output?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511507#M32319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm just putting together a list of pin resources for my product and, no surprises, I'm running out of IO.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use DAC0_OUT as an Digital Output?&amp;nbsp; For the application, the operation does not need to be particularly fast nor high current (1mA max).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any example code (I will be working with KSDK2) would be very much appreciated.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 15:40:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511507#M32319</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2016-03-29T15:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Kinetis DAC0_OUT Pin be used as a Digital Output?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511508#M32320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Myke:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please always mention the full part number so we can provide better assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding DAC0_OUT, you need to check the pinout table in the corresponding Reference Manual to see if the pin has a GPIO function assigned under &lt;STRONG&gt;ALT0&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- For example the KL25 manual shows this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26385iFF29491640B8EF4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can configure the pin as PTE30 and use it as GPIO. It can also be used for TPM module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On the other hand if you see the K64 manual then you would find this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26515i3B3D6627356B13A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can see that the pin does not have any digital function, only analog (DAC, Comparator and ADC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Now if you intend to use the DAC low and high digital values conversion to emulate a digital output then I guess it is possible but not an efficient approach. Also as you mentioned pay attention not to exceed the max output load current as specified in the datasheet. Below an example for K64:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="K64_DAC.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/3140iAB2F375E58FA1528/image-size/large?v=v2&amp;amp;px=999" role="button" title="K64_DAC.png" alt="K64_DAC.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Jorge Gonzalez&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, 30 Mar 2016 04:46:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511508#M32320</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2016-03-30T04:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Kinetis DAC0_OUT Pin be used as a Digital Output?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511509#M32321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply - sorry about that, the part number I'm interested in is the MK22FN128VLH10 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I look at the datasheet, the DAC0_OUT pin is the same as the K64 example you quoted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going a bit further and looking at the KSDK2 API Reference, I see&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;Working as a basic DAC without the hardware buffer feature.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Configures the DAC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DAC_GetDefaultConfig(&amp;amp;dacConfigStruct);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DAC_Init(DEMO_DAC_INSTANCE, &amp;amp;dacConfigStruct);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DAC_SetBufferReadPointer(DEMO_DAC_INSTANCE, 0U);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DAC_SetBufferValue(DEMO_DAC_INSTANCE, 0U, dacValue);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which should give me the capability to set DAC0_OUT to the output that is required (by calling "DAC_SETBufferValue" as needed)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 13:49:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Can-the-Kinetis-DAC0-OUT-Pin-be-used-as-a-Digital-Output/m-p/511509#M32321</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2016-03-31T13:49:36Z</dc:date>
    </item>
  </channel>
</rss>

