- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, todat I opened a new project, I wanted to have a timer running free on my project so I can need to get delta time, the thing is that I start the timer and it it counting backwards?? , how can I fix this?, It can not be a software Error, because I am Only calling Timer_Start(); and Timer_ReadCounter();
Thanks 😃
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
The timer usually counts down to zero from period value. A simple difference (PeriodValue - Counter) will give the counts elapsed.
Some more information needed: Which PSoC ? Which board (self made, Kit? Which kit).
When you got stuck, please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
The timer usually counts down to zero from period value. A simple difference (PeriodValue - Counter) will give the counts elapsed.
Some more information needed: Which PSoC ? Which board (self made, Kit? Which kit).
When you got stuck, please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, this is what I did:
uint8_t a = Timer_ReadPeriod();
uint8_t b = Timer_ReadCounter();
CurrentTime = (a - b);
Im Using CY8CKIT - 059 , the project is really simple, im just trying to check for Delta time so I can read it at the begin of my loop and then use the same "time" on different functions, I think it was a pretty generic project so i didn't included it, but got it gorking now, thanks Bob