2 Replies Latest reply on Apr 13, 2012 1:33 PM by MiHe_282546

    Time Functions




      Is there any built in time functions? 


      I need a function that returns the number of microseconds since the PSoC5 began running the current program...




      Michael H.

        • 1. Re: Time Functions

          Hi Michael,


          there's an RTC-module (Real-Time-Clock) which you could use, but any 32-bit timer will do better. Use as the clock input for the timer a 1MHz clock, set the period to 360000000 and you get a TC of 6 minutes with a resolution of 1µs. When using an interrupt to count the 6 minutes, have a look at the CY_ISR_PROTO(), CY_ISR() (both to find in the System Reference Manual under "Help->Documentation" in Creator) and Isr_Startex() (Datasheet of Isr). I just posted a similar example for Neha, have a look at that project.



          • 2. Re: Time Functions

             Thanks again Bob!