Go Down

Topic: Digital input frecuency?? (Read 1 time) previous topic - next topic

nahuelv

Hi, my name is Nahuel and I want to make a proyect. I have digital pulses of 50microsec of duration that came from a detector. It's not regular pulses, the only thing that I know is that the signal will be in high for 50micosec but could be 100 pulses in 1s or 3 pulses in 1s. I wan't to make a counter that say's the number of pulses in one second. I don't know how fast is the digital read, how many samples it takes?

Thanks and sorry for my English

MarkT

About 4 to 5 us per call to digitalRead I think.  If you need faster then direct port manipulation is available...
[ I won't respond to messages, use the forum please ]

CrossRoads

Take a look at the pulseIn() function also, may do what you need already.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nahuelv


Take a look at the pulseIn() function also, may do what you need already.

YEEEEAHHHH, Thank's CrossRoads   :)

retrolefty


Take a look at the pulseIn() function also, may do what you need already.


Not sure that will work. He already knows the width (50usec) of the pulses, he wants to know how many pulses occur in a fixed timed sampling period.



Lefty

Go Up