Measure the pulse width of a digital input (by Carlos Torrez)
Good day, Mrs.
I am trying to read the time it takes a digital input to make two pulses (start and end and so on), the idea is to record this time to later obtain an average of the last 6 pulses. In other words, I need the time that the period takes.
ON OFF ON
____ ___ ____
___| |_____| |____| |___
[--- p0 ---]---p1---]
Read p0 for 6 times and average
Note: The next period starts when the last one ends (p1)
************************************************************
Buen dia Seņores
Estoy intentando leer el tiempo que tarda una entrada digital en realizar dos pulsos (inicio y fin y asi sucesivamente), la idea es registrar este tiempo para posteriormente obtener un promedio de los ultimos 6 pulsos. Dicho de otro modo necesito el tiempo que tarda el periodo.
Estare agradecido por su ayuda. saludos
More details (by Carlos Torrez)
...ON...OFF...ON
....____.......___......____
___|....|_____|...|____|....|___
...[--- p0 ---]---p1---]