<?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のトピックRe: 9S08AW60 Output Compare, using the toggle output.  Can I preset the state of the FlipFlop?</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166767#M10701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I simply set or clear the port output for that and it works for me on toggle mode.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PTCD_PTCD2 = 1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Nov 2007 16:22:33 GMT</pubDate>
    <dc:creator>BasePointer</dc:creator>
    <dc:date>2007-11-26T16:22:33Z</dc:date>
    <item>
      <title>9S08AW60 Output Compare, using the toggle output.  Can I preset the state of the FlipFlop?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166766#M10700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I want to use the toggle on compare (or the set/clear on compare) to run the output pin, how do I preset the flipflop?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e. when I enable the function, I want the output to be a certain, known state.&amp;nbsp; How do I preset it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to read the state of the flipflop and let the TPM channel execute a cycle or 2 to ensure its preset properly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bob Bailey&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bailey Engineering Inc&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 12:25:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166766#M10700</guid>
      <dc:creator>TurboBob</dc:creator>
      <dc:date>2007-11-26T12:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: 9S08AW60 Output Compare, using the toggle output.  Can I preset the state of the FlipFlop?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166767#M10701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I simply set or clear the port output for that and it works for me on toggle mode.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PTCD_PTCD2 = 1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2007 16:22:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166767#M10701</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2007-11-26T16:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: 9S08AW60 Output Compare, using the toggle output.  Can I preset the state of the FlipFlop?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166768#M10702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Bob,&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 presume you will be using interrupts on the TPM channel.&amp;nbsp; If you need to explicitly control the output state resulting from an output compare, I suggest you don't set for toggle mode.&amp;nbsp; Instead, select either set on compare, or clear on compare, from within the ISR, to correspond with the opposite of the current state.&amp;nbsp; The current state would be indicated by bit-2 of the channel status and control register.&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;When initialising the timer channel, and prior to enabling interrupts, the initial setting should clear on compare.&amp;nbsp; You could also read the current&amp;nbsp;timer counter value, and set the initial channel compare value to occur a few timer cycles hence.&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>Mon, 26 Nov 2007 17:58:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166768#M10702</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-11-26T17:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: 9S08AW60 Output Compare, using the toggle output.  Can I preset the state of the FlipFlop?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166769#M10703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Hmmm,&lt;BR /&gt;They seem to have dropped the output preset mode from the TPM in the S08, like in the GP32 for instance.&lt;BR /&gt;Perhaps the method suggested by BasePointer is sufficient.&lt;BR /&gt;Or in your initialisation you could set up a compare to the correct level, wait for it, then do toggles from there.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 05:28:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/9S08AW60-Output-Compare-using-the-toggle-output-Can-I-preset-the/m-p/166769#M10703</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-11-27T05:28:48Z</dc:date>
    </item>
  </channel>
</rss>

