Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Measure the pulse width of a digital input

(you are viewing a thread; or go back to list of threads)

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
Wed Jan 4 2017, 13:22:21
More details (by Carlos Torrez)

...ON...OFF...ON
....____.......___......____
___|....|_____|...|____|....|___
...[--- p0 ---]---p1---]
Wed Jan 4 2017, 13:26:45
(no subject) (by MGP)
Here's an example of how things can be programmed using shift registers.
Thu Jan 5 2017, 04:56:28, download attachment Cycle_counter_6cycles.ld
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):