<?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 How do I create a 38kHz signal with kl43z? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-create-a-38kHz-signal-with-kl43z/m-p/500194#M4748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello yall,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a 38kHz signal for the IR LED I am using. I'm using kl43z, SDK, and PE.&lt;/P&gt;&lt;P&gt;At the moment I'm using a for loop so it waits for 13 microseconds and toggle command to turn off and on the IR LED.&lt;/P&gt;&lt;P&gt;My code is the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="138616_138616.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121059iA0F932D8CB5FD974/image-size/large?v=v2&amp;amp;px=999" role="button" title="138616_138616.png" alt="138616_138616.png" /&gt;&lt;/span&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/2069i8463523E5F9ECC38/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;I don't know if the for loop is creating the desired 13 micro seconds. But I did the calculation assuming a clock speed of 8MHz.&lt;/P&gt;&lt;P&gt;The clock might actually be 48MHz? So then I'd do 624 no-ops. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But alas, the circuit is not working. I got the circuit working on an arduino and downloaded a code that had the 38kHz signal. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also bonus question, I haven't been able to get the GPIO_DRV_ClrPinOutput or the GPIO_DRV_SetPinOutput commands to work.&lt;/P&gt;&lt;P&gt;The only thing that works is the GPIO_DRV_TogglePinOutput.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 01:37:11 GMT</pubDate>
    <dc:creator>christopherira</dc:creator>
    <dc:date>2016-02-10T01:37:11Z</dc:date>
    <item>
      <title>How do I create a 38kHz signal with kl43z?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-create-a-38kHz-signal-with-kl43z/m-p/500194#M4748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello yall,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a 38kHz signal for the IR LED I am using. I'm using kl43z, SDK, and PE.&lt;/P&gt;&lt;P&gt;At the moment I'm using a for loop so it waits for 13 microseconds and toggle command to turn off and on the IR LED.&lt;/P&gt;&lt;P&gt;My code is the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="138616_138616.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121059iA0F932D8CB5FD974/image-size/large?v=v2&amp;amp;px=999" role="button" title="138616_138616.png" alt="138616_138616.png" /&gt;&lt;/span&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/2069i8463523E5F9ECC38/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;I don't know if the for loop is creating the desired 13 micro seconds. But I did the calculation assuming a clock speed of 8MHz.&lt;/P&gt;&lt;P&gt;The clock might actually be 48MHz? So then I'd do 624 no-ops. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But alas, the circuit is not working. I got the circuit working on an arduino and downloaded a code that had the 38kHz signal. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also bonus question, I haven't been able to get the GPIO_DRV_ClrPinOutput or the GPIO_DRV_SetPinOutput commands to work.&lt;/P&gt;&lt;P&gt;The only thing that works is the GPIO_DRV_TogglePinOutput.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 01:37:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-create-a-38kHz-signal-with-kl43z/m-p/500194#M4748</guid>
      <dc:creator>christopherira</dc:creator>
      <dc:date>2016-02-10T01:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a 38kHz signal with kl43z?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-create-a-38kHz-signal-with-kl43z/m-p/500195#M4749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christopher,&lt;/P&gt;&lt;P&gt;I would use the KL43 TPM module to generate a PWM of 38kHz with 50% duty cycle.&lt;/P&gt;&lt;P&gt;Attached is KDS_3.0+KSDK_1.3+PE that does this.&lt;/P&gt;&lt;P&gt;You can measure (and see) the 38kHz signal on the green LED of the FRDM-KL43Z Freedom board.&lt;/P&gt;&lt;P&gt;I used a fsl_tpm Processor Expert Component to set it up.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 23:38:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-create-a-38kHz-signal-with-kl43z/m-p/500195#M4749</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-02-11T23:38:11Z</dc:date>
    </item>
  </channel>
</rss>

