- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi every one
i want to calculate the number of pulse of a signal, u think that is possible with this example by using juste only an input +interruption and than count the number of rising edge ....?
thank u every one ^^
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Counting the pulses that way will work when the frequency is not too high (< 2-3kHz). At higher frequencies you will need a counter. For your current project, using a counter (that can be reset by pressing a switch) will make some things easier.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Counting the pulses that way will work when the frequency is not too high (< 2-3kHz). At higher frequencies you will need a counter. For your current project, using a counter (that can be reset by pressing a switch) will make some things easier.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Bob says, I would configure a TCPWM component as a Timer/Counter with the count input enabled and set to rising edge. Connect the pin to that terminal and a fast clock (fast compared with the counting frequency) to the clock input. The TCPWM is 16 bits wide so you have 65535 counts before it overflows.