<?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>S12 / MagniV MicrocontrollersのトピックRe: Low PWM frequency.</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126604#M554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&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;I might have considered that the direct use of timer output compare would not have been suitable for a 10 second PWM period, since the timer overflow period would need to be&amp;nbsp;10 seconds minimum.&amp;nbsp; Can you actually achieve this?&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;With the method that I suggested, the timer output compare could be used to generate a periodic interrupt in the region of milliseconds to tens of milliseconds.&amp;nbsp; A multiple of this period represents the PWM period.&amp;nbsp; The suitability of the method will depend, to a large extent, on the resolution you need to achieve - probably an upper limit of 12 bits.&amp;nbsp; This would require a timer interrupt period of 10000/4096 ~= 2.5 ms.&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, 26 Apr 2007 00:05:58 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-04-26T00:05:58Z</dc:date>
    <item>
      <title>Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126599#M549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;I want to generate a low PWM frequency signal,&lt;/DIV&gt;&lt;DIV&gt;I read the AN2612.pdf document, but it's good just for certain low frequency, but not as low as 0.1Hz!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;does anybody have an idea how to do that?&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;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 01:20:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126599#M549</guid>
      <dc:creator>prog_ram</dc:creator>
      <dc:date>2007-03-16T01:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126600#M550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&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;With a PWM frequency as low as 0.1 Hz, you hardly need to use the PWM module hardware - you could simply "bit-bang" the PWM waveform.&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;You don't mention the resolution you need to achieve - but a possibility is to generate&amp;nbsp;a timer interrupt for each incremental period of the PWM signal.&amp;nbsp; Within the ISR, a counter would be incremented, and then&amp;nbsp;tested to determine&amp;nbsp;whether a change of output state was needed.&amp;nbsp; For example, if you&amp;nbsp;require 8-bit resolution, the timer interrupt&amp;nbsp;period required would be 39 milliseconds.&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>Fri, 16 Mar 2007 10:35:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126600#M550</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-03-16T10:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126601#M551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;thanks to the reply,&lt;/DIV&gt;&lt;DIV&gt;actually I don't know what &lt;FONT size="2"&gt;"bit-bang" the PWM&amp;nbsp; means!!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;so, can you please give me an idea how to do that..&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;thank you again..&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;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 20:58:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126601#M551</guid>
      <dc:creator>prog_ram</dc:creator>
      <dc:date>2007-04-19T20:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126602#M552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&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;What I meant was to use a GP output for your PWM signal.&amp;nbsp; Then, within the periodic timer ISR you could increment a counter variable, and test&amp;nbsp;the new value -&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 the new value is equal to the required pulse width,&amp;nbsp;clear the output.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If the new value is equal to the "terminal count" value,&amp;nbsp;set the output and clear the counter value.&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;The total PWM period would be (timer interrupt period * terminal count).&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>Wed, 25 Apr 2007 11:41:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126602#M552</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-04-25T11:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126603#M553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I got you thanks BigMac,&lt;/DIV&gt;&lt;DIV&gt;what I am doing now is using the output compare to generate the PWM, this is described in one of the Freescale App. Notes.&lt;/DIV&gt;&lt;DIV&gt;it's working so far, but I wonder whether the method you described is better than Output compare one?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;thanks again&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 20:06:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126603#M553</guid>
      <dc:creator>prog_ram</dc:creator>
      <dc:date>2007-04-25T20:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126604#M554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&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;I might have considered that the direct use of timer output compare would not have been suitable for a 10 second PWM period, since the timer overflow period would need to be&amp;nbsp;10 seconds minimum.&amp;nbsp; Can you actually achieve this?&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;With the method that I suggested, the timer output compare could be used to generate a periodic interrupt in the region of milliseconds to tens of milliseconds.&amp;nbsp; A multiple of this period represents the PWM period.&amp;nbsp; The suitability of the method will depend, to a large extent, on the resolution you need to achieve - probably an upper limit of 12 bits.&amp;nbsp; This would require a timer interrupt period of 10000/4096 ~= 2.5 ms.&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, 26 Apr 2007 00:05:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126604#M554</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-04-26T00:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Low PWM frequency.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126605#M555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Acutally yes we can do so by dealing with the overflow of the timer counter.&lt;/DIV&gt;&lt;DIV&gt;I implemented the idea you suggested and it worked very good, however, there will be restriction on the resolutions (as you said), and increasing it will generate more interrupts which is not good as I am using almost all the communications availble in HCS12 (IIC, SPI, SCI and CAN in future) don't you think so?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;thank you..&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 00:26:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Low-PWM-frequency/m-p/126605#M555</guid>
      <dc:creator>prog_ram</dc:creator>
      <dc:date>2007-04-26T00:26:42Z</dc:date>
    </item>
  </channel>
</rss>

