1 Reply Latest reply on Dec 13, 2015 9:35 PM by user_343349849

    Help with counter for frequency measurement

    user_343349849

      Hi,

         

      I am looking for some help to measure frequency on a digital input pin. I found some information online and attempted to implement it but I am not getting correct results.

         

      The attached test code is supposed to enable the counter for a period of 10ms and then read the count accumulated. My input signal is 3V Square wave with frequency = 125 kHz. The period of the input frequency is 8us. I am expecting to accumulate a count of around 1250 but actually getting 19595.

         

      Processor is PSOC 5LP and I am using Creator version 3.3

         

      I have attached my little test code workspace.

         

      Thanks in Advance

         

      David