2 Replies Latest reply on Sep 21, 2017 6:14 PM by tivoc_1247131

    Measure Time Between Pulses In Hardware

      I would like to measure the time between two rising edges to calculate speed with a hall effect sensor (30000rpm).

      Ideally, I would like an up-counter that would capture on a rising edge to a LIFO buffer or single register and then reload the counter.

      The problem is that the only counters available use FIFO buffers that overwrite to the front of the buffer, making it hard to tell which value was the latest value. If the buffer has not overflown, then the newest value is at the back. However if the buffer has overflown, then the newest value is at the front. However, since there is no overflow status bit, I would be forced to interrupt the processor on every capture to make sure the FIFO buffer does not overflow. I do not want to have to interrupt the processor so often. Is there a way to avoid using interrupts, avoid using polling, and avoid writing VHDL for my own counter? Thank you.