Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ Creator & Designer Forum Discussions

Anonymous
Not applicable

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 ^^ 

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

i totally agree with you, just was wondering if their is any easy solution to realize the project just only with a pine +isr but actually ill work with a higher frequency sow is better to use a counter, u can tack a look for wath i did if you want ^^, is worked with a counter.

0 Likes

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.