<?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>LPCXpresso IDEのトピックRe: Counting on a GPIO input pin</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560677#M15962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by raimond on Sat Mar 12 02:12:20 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I have done some more debugging, and I think is just an GPIO issue, not timers or cpu frequency error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have counted the interrupts between the detected edges, and I have seen even ONE between edges at 10kHz, which is very fast on a 100Hz signal...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The scope is showing a very clean signal, which is anyway counted very well by a mega64...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it's seems that there are 0-5 false triggers at 100Hz. 0-10 at 1000Hz. The problem is that they are just random, and the resulted precision is too low for my application (hehe I think that I'm kind of desperate to speak of precision of a digital counting :rolleyes:).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Too bad I lost my sources for my frequency generator. I had a program which generated one million pulses sharp at a given frequency. And my target it was supposed to count one million pulses sharp. And it did in the first too revisions (rabbit2000 and z8encore).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:14:45 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:14:45Z</dc:date>
    <item>
      <title>Counting on a GPIO input pin</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560676#M15961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by raimond on Sat Mar 12 01:40:24 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody knows about any issue about GPIO input pin reading on an interrupt? I have an application which need a frequency meter. The frequency is measured first sampling the input pin on a timer interrupt, detecting the edges by software, and then, the counter is reported to the second, on another timer interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue: I always have a few additional edges detected, for example, at 100Hz signal I have 100-106 Hz measured, not constant. Never 99 !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspected the gpio input not having schmitt-trigger driver, I added an external schmitt-trigger, no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Frequency sampling: 10kHz. Input pin: P1.0. With P1.1 the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My application is a very mature one, I have done it on a Rabbit2000, Z8encore, and now I want to port it on an LPC1756. On previous micros I always got 100Hz sharp, not the LPC1756 case :(. I even have done an ATmega64 test, 100Hz sharp again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm going to loose my confidence about the LPC17xx.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I use a good 12MHz crystal, and I'm working at 12Mhz without PLL. Pclk is 3MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have done many things, using the same timer for scanning/second reporting, using timer0, timer1, RIT..., disabling ints, enabling ints, using the input in all four modes...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, when scanning at 400Hz, I get the 100Hz indeed, but there's no use, because I have to detect frequencies till 4kHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:14:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560676#M15961</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Counting on a GPIO input pin</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560677#M15962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by raimond on Sat Mar 12 02:12:20 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I have done some more debugging, and I think is just an GPIO issue, not timers or cpu frequency error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have counted the interrupts between the detected edges, and I have seen even ONE between edges at 10kHz, which is very fast on a 100Hz signal...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The scope is showing a very clean signal, which is anyway counted very well by a mega64...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it's seems that there are 0-5 false triggers at 100Hz. 0-10 at 1000Hz. The problem is that they are just random, and the resulted precision is too low for my application (hehe I think that I'm kind of desperate to speak of precision of a digital counting :rolleyes:).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Too bad I lost my sources for my frequency generator. I had a program which generated one million pulses sharp at a given frequency. And my target it was supposed to count one million pulses sharp. And it did in the first too revisions (rabbit2000 and z8encore).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:14:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560677#M15962</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counting on a GPIO input pin</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560678#M15963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat Mar 12 05:21:27 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Use capture input of Timer 0/1/2/3 to count (without interrupt)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Use SysTick Timer Interrupt (10-1000ms) to calculate frequency.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the way my frequency counter is working :):).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:14:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560678#M15963</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counting on a GPIO input pin</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560679#M15964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by raimond on Sat Mar 12 09:40:52 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Zero, you're great!:)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was lucky enough to have a button input at P1.19 (CAP1.1) which I hardwired to my original P1.0 pin. Using counting mode of TIM1 with CAP1.1 as the input clock just... works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I kept the TIMER0 as a base for frequency calculation, working as expected, but the SysTick is good too I suppose (my SysTick is very busy though).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, the LPC1756 is back. Thanks a lot, I own you a virtual beer Zero! (or maybe NXP? :D)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stil, no clue why software filtering is not working...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Raimond&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:14:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Counting-on-a-GPIO-input-pin/m-p/560679#M15964</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:14:46Z</dc:date>
    </item>
  </channel>
</rss>

