Adding inputs and outputs.
There are times in electronics where you need more data lines than the device you are using can handle. This is true of microcontrollers and especially the old computer parallel port. The one shortcoming of the following setups is that you can use only one line at a time, but then you can use just three lines to control eight lines. That frees up control lines if you need to use the control lines for other tasks, Time slicing can make the setups more interactive.
The 74151 is a 8 input channel multiplexer. It is exceptionally useful when you need to expand your inputs. This allows you to convert 3 outputs and 1 input into 8 addressable inputs.
The 74151 is a 8 input channel multiplexer. It is exceptionally useful when you need to expand your inputs. This allows you to convert 3 outputs and 1 input into 8 addressable inputs.
You would have to write software that would cycle through all the inputs to for them to be consistently valid. You would need know what the memory locations of the specific data lines are to take advantage of the multiplexer. An example might be:
data = inp(&h379) IF (data and 32) = 32 then print "Out of paper / pin 12 high"
The 74238 is a 8 output channel demultiplexer, Now we can also go in the opposite direction. That is we can choose the ouput line using just one data line in with three select inputs and eight data out lines. A demultiplexer (or demux) is a device taking a single input signal and selecting one of many data-output-lines, which is connected to the single input. A multiplexer is often used with a complementary demultiplexer on the receiving end
Comments
Post a Comment