cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

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
Reply
1 Solution
Esteemed Contributor II

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
Reply
3 Replies
Esteemed Contributor II

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
Reply
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
Reply
Employee

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.