<?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 Trouble combining code for I/O and PWM (TPM1) - DEMO9S08AW60E in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168166#M10957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello everyone,&lt;/DIV&gt;&lt;DIV&gt;I've received some help here before and greatly appreciated all of it. I think this is my last question before I'll be all set.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using a Freescale Demo board: DEMO9S08AW60E (HCS08)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1. Currently I have two input ports being used (PTA2, PTA4) and two output ports (PTA3,PTA5). The input ports are taking in 5V then triggering a short delay (using&amp;nbsp;a basic counter). After the delay, the 5V is then outputted to the other ports (depending on which input port was activated with the initial input).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;2. I also have a TMP1 setup to output a 100kHz signal.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I setup a program for each of these separately they work fine (the PWM signal or the I/O's). I found that if I change the "overflow interrupt" in Device Initialization on the TPM1 then either the I/O's or the PWM work, but never together. If the "overflow interrupt" flag is set to "enable" then the PWM output of 100kHz works fine. If the "overflow interrupt" flag is set to "disable" then the PWM no longer outputs, but the I/O (w/delays) work fine.&lt;/DIV&gt;&lt;DIV&gt;Any&amp;nbsp;ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-Chris&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-11-29&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;11:55 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Nov 2007 13:11:23 GMT</pubDate>
    <dc:creator>Venom2000</dc:creator>
    <dc:date>2007-11-29T13:11:23Z</dc:date>
    <item>
      <title>Trouble combining code for I/O and PWM (TPM1) - DEMO9S08AW60E</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168166#M10957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello everyone,&lt;/DIV&gt;&lt;DIV&gt;I've received some help here before and greatly appreciated all of it. I think this is my last question before I'll be all set.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using a Freescale Demo board: DEMO9S08AW60E (HCS08)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1. Currently I have two input ports being used (PTA2, PTA4) and two output ports (PTA3,PTA5). The input ports are taking in 5V then triggering a short delay (using&amp;nbsp;a basic counter). After the delay, the 5V is then outputted to the other ports (depending on which input port was activated with the initial input).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;2. I also have a TMP1 setup to output a 100kHz signal.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I setup a program for each of these separately they work fine (the PWM signal or the I/O's). I found that if I change the "overflow interrupt" in Device Initialization on the TPM1 then either the I/O's or the PWM work, but never together. If the "overflow interrupt" flag is set to "enable" then the PWM output of 100kHz works fine. If the "overflow interrupt" flag is set to "disable" then the PWM no longer outputs, but the I/O (w/delays) work fine.&lt;/DIV&gt;&lt;DIV&gt;Any&amp;nbsp;ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-Chris&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-11-29&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;11:55 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2007 13:11:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168166#M10957</guid>
      <dc:creator>Venom2000</dc:creator>
      <dc:date>2007-11-29T13:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble combining code for I/O and PWM (TPM1)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168167#M10958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Chris,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you have configured the TPM channel for PWM operation (assuming edge aligned), my understanding is that the PWM operation should occur whether or not&amp;nbsp;the&amp;nbsp;overflow interrupt is enabled.&amp;nbsp; If you are counting timer overflows to generate your delay, the period between each count will be very short (10us), assuming you are using the same TPM module for both.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Do you happen to be using Processor Expert?&amp;nbsp; If so, I guess it is possible there is some sort of conflict here, perhaps with the TPM1MOD setting.&amp;nbsp; Have you tried using TPM1 module for PWM, and TPM2 module for the delays?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2007 22:09:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168167#M10958</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-11-29T22:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble combining code for I/O and PWM (TPM1) - DEMO9S08AW60E</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168168#M10959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Chris,&lt;BR /&gt;&lt;BR /&gt;We have demo code on our website that uses the AW16.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://witztronics.com/product_info.php?cPath=22_1&amp;amp;products_id=39" target="test_blank"&gt;http://witztronics.com/product_info.php?cPath=22_1&amp;amp;products_id=39&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It's not exacty what you are doing, but it monitors port pins and lights leds accordingly and uses the PWM as a DAC output.&amp;nbsp; It seems with a little modification, it could do what you are trying to accomplish.&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Dec 2007 02:54:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Trouble-combining-code-for-I-O-and-PWM-TPM1-DEMO9S08AW60E/m-p/168168#M10959</guid>
      <dc:creator>Witztronics</dc:creator>
      <dc:date>2007-12-01T02:54:57Z</dc:date>
    </item>
  </channel>
</rss>

