- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
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.
- Labels:
-
PSOC5 LP MCU
- Tags:
- cycle time
- psoc 5lp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have just posted the following sample.
Can this be it? 😉
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Switten,
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
Best Regards
Raj Chaudhari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you verry much @Raj_C
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Switten,
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."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have just posted the following sample.
Can this be it? 😉
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MotooTanaka at first glance it looks like this is what I needed.
Thank you very much for your help and for replying 😆😊