Time Functions

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

Hi,

   

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...

   

Thanks,

   

Michael H.

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

Bob

0 Likes
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

 Thanks again Bob!

0 Likes