<?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 Re: s12p no dlycnt on input capture in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/s12p-no-dlycnt-on-input-capture/m-p/174037#M6025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sprince wrote: this makes no sense-how can noise be filtered out say, if one was to connect the input capture pin to a camshaft or crankshaft sensor?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can still filter out noise via software.&amp;nbsp; Use input capture to detect a rising edge and then check the pin a little bit after that to see if the pin is still high.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
ECT_EnableInputCapture(0, RISING_EDGES);...void interrupt TC0Handler(void){    if(TC0IsInInputCaptureMode()){        //switch to output compare mode to wait a while        TC0 = TCNT + SOME_DELAY;        ECT_EnableOutputCompare(0);    }    else{        if(PTT_PTT0){ //if pin still high            PulseCount++; //got true pulse, not noise        }        //switch back to input capture to detect rising edges        ECT_EnableInputCapture(0, RISING_EDGES);    }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;Or something like that.&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:22:46 GMT</pubDate>
    <dc:creator>isionous</dc:creator>
    <dc:date>2020-10-29T09:22:46Z</dc:date>
    <item>
      <title>s12p no dlycnt on input capture</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/s12p-no-dlycnt-on-input-capture/m-p/174036#M6024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps I am not reading the input capture section for the s12p correctly.&amp;nbsp; I cannot find the delaycount register.&amp;nbsp; Does it not exist on the p version?&amp;nbsp; This makes no sense-how can noise be filtered out say, if one was to connect the input capture pin to a camshaft or crankshaft sensor?&amp;nbsp; Even with external filtering on this pin I have always seen noise and used the delay count to filter it out.&amp;nbsp; Wasn't this derivative designed specifically for the small engine market?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S. Prince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2010 07:58:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/s12p-no-dlycnt-on-input-capture/m-p/174036#M6024</guid>
      <dc:creator>sprince</dc:creator>
      <dc:date>2010-02-09T07:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: s12p no dlycnt on input capture</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/s12p-no-dlycnt-on-input-capture/m-p/174037#M6025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sprince wrote: this makes no sense-how can noise be filtered out say, if one was to connect the input capture pin to a camshaft or crankshaft sensor?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can still filter out noise via software.&amp;nbsp; Use input capture to detect a rising edge and then check the pin a little bit after that to see if the pin is still high.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
ECT_EnableInputCapture(0, RISING_EDGES);...void interrupt TC0Handler(void){    if(TC0IsInInputCaptureMode()){        //switch to output compare mode to wait a while        TC0 = TCNT + SOME_DELAY;        ECT_EnableOutputCompare(0);    }    else{        if(PTT_PTT0){ //if pin still high            PulseCount++; //got true pulse, not noise        }        //switch back to input capture to detect rising edges        ECT_EnableInputCapture(0, RISING_EDGES);    }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;Or something like that.&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:22:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/s12p-no-dlycnt-on-input-capture/m-p/174037#M6025</guid>
      <dc:creator>isionous</dc:creator>
      <dc:date>2020-10-29T09:22:46Z</dc:date>
    </item>
  </channel>
</rss>

