For a project I am trying to make, I need to know the elapsed time between each cycle(so that i can subtract these) . I know that in arduino you can use the millies() functionfor , but I didn't find anything like that in the creator. I am aware of the exsistence Odissey's implementation using a stopwatch, but I wonder if there is a easier way to do this.
thanks for replying
Solved! Go to Solution.
PSoC5 LP MCU
You can refer to the thread 'Measuring time interval using SysTick (CY8CKIT-059/CY8CKIT-044)' by MotooTanaka.
Let me know if you need further help with this.
Thank you verry much @Raj_JC
But wanted to know was the duration of 1 cycle when running the code without any external HW involved. The reason for this is because I am reading the data from an MPU 6050 and I want to know to current angle the device is positioned in.
I used Sam's blog as reference for my code but he never completed it. And because I am still a beginner when it comes to programming I am not capable to adjust the program you suggested to run without the input button.
But thx for replying
Raj's suggestion of using the systick resources in the PSoC is very simple and requires NO external components.
Odissey1's stopwatch, example uses internal PSoC timers to provide even more accuracy. Again no external components to be added.
"Engineering is an Art. The Art of Compromise."
I think there was a misunderstanding. What it meant by external components was the button (on pin 2.2) that starts/clears the interupt.
It it possible to do this without the need of the button input? (so that I can compare the elapsed time between the data read from the mpu6050)