<?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: Input Capture on jm128 in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/Input-Capture-on-jm128/m-p/178894#M443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I am in the way of&amp;nbsp; solving this and wanted to share my advances. As I said before for some reason the serial communication of the value acquired by the function Cap1_GetCaptureValue showed always 0. So I changed the routine to be this:&lt;/P&gt;&lt;P&gt;void Cap1_OnCapture(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Write your code here ... */&lt;/P&gt;&lt;P&gt; pulse=TPM1C2V;&lt;/P&gt;&lt;P&gt; Bit2_NegVal();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and boilá!, now when I use a PWM signal as the input to the Input capture and configure it to both edges, if I select the pulse width to be 50 us, I get 51 from the serial communication. (it gets the pulse width correctly), I have tried different values in microseconds and the value is always close (100-106), however the led is blinking oddly, many times more than it should.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Nov 2012 14:52:11 GMT</pubDate>
    <dc:creator>carlospalma</dc:creator>
    <dc:date>2012-11-17T14:52:11Z</dc:date>
    <item>
      <title>Input Capture on jm128</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Input-Capture-on-jm128/m-p/178893#M442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody, I'm working on a project which requires using HC SR04 ultrasonic &lt;/P&gt;&lt;P&gt;ranging module, but I'm stuck using the sensor since I can't seem to make the &lt;/P&gt;&lt;P&gt;Input Capture work using processor expert. So far I have used this:&lt;/P&gt;&lt;P&gt;void Cap1_OnCapture(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Write your code here ... */&lt;/P&gt;&lt;P&gt;if(Cap1_GetCaptureValue(&amp;amp;pulse)==ERR_OK)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bit2_NegVal();&lt;/P&gt;&lt;P&gt;&amp;nbsp; Cap1_Reset();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if an event of getting the value of the timer when an edge is detected occurs, a Led is supposed &lt;/P&gt;&lt;P&gt;to change its state. Problem is that even though the Led blinks, when I try to see the value of the &lt;/P&gt;&lt;P&gt;variable pulse using a serial communication, I get its initial value (200) in this case, which means that the &lt;/P&gt;&lt;P&gt;event didn't change it!&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 19:55:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Input-Capture-on-jm128/m-p/178893#M442</guid>
      <dc:creator>carlospalma</dc:creator>
      <dc:date>2012-11-16T19:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Input Capture on jm128</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Input-Capture-on-jm128/m-p/178894#M443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I am in the way of&amp;nbsp; solving this and wanted to share my advances. As I said before for some reason the serial communication of the value acquired by the function Cap1_GetCaptureValue showed always 0. So I changed the routine to be this:&lt;/P&gt;&lt;P&gt;void Cap1_OnCapture(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Write your code here ... */&lt;/P&gt;&lt;P&gt; pulse=TPM1C2V;&lt;/P&gt;&lt;P&gt; Bit2_NegVal();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and boilá!, now when I use a PWM signal as the input to the Input capture and configure it to both edges, if I select the pulse width to be 50 us, I get 51 from the serial communication. (it gets the pulse width correctly), I have tried different values in microseconds and the value is always close (100-106), however the led is blinking oddly, many times more than it should.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 14:52:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Input-Capture-on-jm128/m-p/178894#M443</guid>
      <dc:creator>carlospalma</dc:creator>
      <dc:date>2012-11-17T14:52:11Z</dc:date>
    </item>
  </channel>
</rss>

