<?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>Classic/Legacy CodeWarriorのトピックCW and C beginners question</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128426#M293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;How do you know how many processor calculations are used for particular C instructions? I think that a part of my code should be running a little faster than it is and would like to know whats slowing it down. I cant really step by step it as it relies on a complicated waveform from another MC.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 Aug 2006 21:03:02 GMT</pubDate>
    <dc:creator>ernestsnaith</dc:creator>
    <dc:date>2006-08-27T21:03:02Z</dc:date>
    <item>
      <title>CW and C beginners question</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128426#M293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;How do you know how many processor calculations are used for particular C instructions? I think that a part of my code should be running a little faster than it is and would like to know whats slowing it down. I cant really step by step it as it relies on a complicated waveform from another MC.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Aug 2006 21:03:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128426#M293</guid>
      <dc:creator>ernestsnaith</dc:creator>
      <dc:date>2006-08-27T21:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: CW and C beginners question</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128427#M294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Found the answer. However could somone give me a little advise, i have the following calculation which seems to take 50 cpu cycles.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Angle = ((390 - (ToothNo * 30)) - ((TCNT - Tooth1) / Gapdeg));&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also have 4&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((C1START &amp;lt;= 360) &amp;amp;&amp;amp; (ANGLE &amp;lt;= C1START))&amp;nbsp;&amp;nbsp;&amp;nbsp; // COIL1 START PULSE&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Which combine to use around 90 cpu cycles.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Are there far more efficient ways to write such things? if so how do i find them out? Are there any good books etc?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 15:27:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128427#M294</guid>
      <dc:creator>ernestsnaith</dc:creator>
      <dc:date>2006-08-28T15:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: CW and C beginners question</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128428#M295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Not much you can improve. Perhaps use some maths and rewrite the equation with just one integer constant instead of two (390 and 30) since they will always be the same. And avoid division if possible.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 17:36:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW-and-C-beginners-question/m-p/128428#M295</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2006-08-28T17:36:37Z</dc:date>
    </item>
  </channel>
</rss>

