- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to use the timer component to get the speed of an motor signal.
I have no UDBs left and also don't want to use interrupts.
The signal from motor is in the range of 80 Hz to a few hundred Hz.(50:50)
So I thought using a faster clock and then count the clock pulses withing the high level of the motor signal.
But somehow I can't get the timer running.
Is there any way to get the timer running for this purpose?
It does not need to be fast, if I can read the timer just periodically as I need, that would be fine.
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found now a solution.
I am using the basic counter together with a status register.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fixed function version of the timer component has got a capture input (rising edge) which allows to read the last measured value. Nonetheless I would suggest you to use an interrupt with a short handler.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Bob,
can you show how it is realized?
I did not get any readings close to what I want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found now a solution.
I am using the basic counter together with a status register.