P
Paul Ciszek
Suppose I have two sensors that give off a pulse every time an
event occurs; I have a choice of negative-going or positive-going
pulse. I also have a counter that is triggered by a falling edge
followed by a rising edge. I am looking for a simple way to
combine these two streams of pulses to get an accurate combined
count. The problem with using an AND or OR gate is that it wouldn't
correctly handle the case where one pulse arrives while another is
still in progress. So, I was thinking of doing the following:
Have one of the streams be normally high and negative-going; have
the other be normally low and positive-going. Feed the two signals
to the inputs of an XOR gate. That way, a lone pulse on either
line would cause the output of the gate to fall and rise; a
pair of overlapping pulses should make the output fall and rise
twice.
So, what's wrong with this? Usually something this simple is
wrong.
event occurs; I have a choice of negative-going or positive-going
pulse. I also have a counter that is triggered by a falling edge
followed by a rising edge. I am looking for a simple way to
combine these two streams of pulses to get an accurate combined
count. The problem with using an AND or OR gate is that it wouldn't
correctly handle the case where one pulse arrives while another is
still in progress. So, I was thinking of doing the following:
Have one of the streams be normally high and negative-going; have
the other be normally low and positive-going. Feed the two signals
to the inputs of an XOR gate. That way, a lone pulse on either
line would cause the output of the gate to fall and rise; a
pair of overlapping pulses should make the output fall and rise
twice.
So, what's wrong with this? Usually something this simple is
wrong.