I previously wrote:
Since the lines are fired in a fixed sequence one at a time, it might be
easier to just put open collector buffers on the odd numbered inputs and
tie all outputs together. This will give a single input that tells
whether the line number is even or odd and the processor can count up or
down every time the even/odd line changes. Line 1 and 2 could be tied to
additional inputs in order to allow the processor to lock onto the line
number and determine whether to count up or down. The processor would not
be able to determine the line number and direction until the line number
reaches line 1 or 2, but this may be acceptable if this is a case where
the processor can be programmed to not do anything until after a lock has
occurred.
This can be further simplified by making your own buffer. Just put a
diode from each odd line to a common point and tie that point to the base
of a transistor through a current limiting resistor. Add a pull up
resistor to the collector and run the output into the I/O port of your
processor.
This is incorrect. I misread the original problem and gave a design for a
buffer that assumed a positive signal from the active line. Since the
active line goes negative, you will have to install the diodes with the
cathodes connecting to the lines and the anodes tied to a common point. A
pull up resistor will also be tied to the common point. The common point
will be tied to the base of a transistor through another diode. The pull
up resistor will limit the current to the base of the transistor so a
separate current limiting resistor is not needed. The diode from the
common point to the base of the transistor will raise the turn on
threshold of the transitor to 1.4 volts. If the lines don't go all the
way to ground when active, it may be necessary to use 2 diodes between
the common point and the base.
Bob Buege