<?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>8-bit MicrocontrollersのトピックMC9S08PA4VWJ</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08PA4VWJ/m-p/804524#M22616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to write pwm&amp;nbsp;logic for MC9S08PA4 microcontroller.i want to control led driver dim pin intensity using this microcontroller..if any sample code is available for this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Sep 2018 02:15:36 GMT</pubDate>
    <dc:creator>meghana_intern</dc:creator>
    <dc:date>2018-09-08T02:15:36Z</dc:date>
    <item>
      <title>MC9S08PA4VWJ</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08PA4VWJ/m-p/804524#M22616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to write pwm&amp;nbsp;logic for MC9S08PA4 microcontroller.i want to control led driver dim pin intensity using this microcontroller..if any sample code is available for this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2018 02:15:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08PA4VWJ/m-p/804524#M22616</guid>
      <dc:creator>meghana_intern</dc:creator>
      <dc:date>2018-09-08T02:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08PA4VWJ</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08PA4VWJ/m-p/804525#M22617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the following code to set the FTM2 (I use the pt60 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM2_MOD = 8000; // PWM frequency is about 1 KHz8000&lt;BR /&gt; &lt;BR /&gt; // Configure channel 0 to PWM mode (center aligned high-true pulses) &lt;BR /&gt; FTM2_C0SC = FTM2_C0SC_ELSB_MASK | FTM2_C0SC_MSB_MASK;&lt;BR /&gt; FTM2_C0V = 4000; // channel 0 set to 50%&lt;BR /&gt; &lt;BR /&gt; // FTM clock = BUSCLK = 8MHz, Overflow Interrupt Enabled, &lt;BR /&gt; FTM2_SC = FTM2_SC_CLKS0_MASK | FTM2_SC_TOIE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interrupt VectorNumber_Vftm2ovf void FTM2ovfISR (void)&lt;BR /&gt;{&lt;BR /&gt; //Clear interrupt flag&lt;BR /&gt; &lt;BR /&gt; (void)FTM2_SC;&lt;BR /&gt; FTM2_SC_TOF = 0;&lt;BR /&gt; counts--;&lt;BR /&gt; if (!counts)&lt;BR /&gt; { &lt;BR /&gt; if (!up_down) //up counting&lt;BR /&gt; {&lt;BR /&gt; FTM2_C0V += 80;&lt;BR /&gt; if (FTM2_C0V == 3920) &lt;BR /&gt; {&lt;BR /&gt; up_down = 1;&lt;BR /&gt; }&lt;BR /&gt; //when reaching 99%, change to down counting&lt;BR /&gt; } &lt;BR /&gt; else &lt;BR /&gt; {&lt;BR /&gt; FTM2_C0V -= 80;&lt;BR /&gt; if (FTM2_C0V == 80) &lt;BR /&gt; {&lt;BR /&gt; up_down = 0;&lt;BR /&gt; }&lt;BR /&gt; //when reaching 1%, change to up counting&lt;BR /&gt; } &lt;BR /&gt; counts = OVF_COUNTS; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; PORT_PTGD_PTGD1 ^= 1; &lt;BR /&gt; &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Vicente Gomez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 17:09:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08PA4VWJ/m-p/804525#M22617</guid>
      <dc:creator>vicentegomez</dc:creator>
      <dc:date>2018-10-02T17:09:21Z</dc:date>
    </item>
  </channel>
</rss>

