Multiplexing to Get More Outputs
fan-out to as many outputs
as desired with a very small
number of starting outputs,
but the required hardware
and software would become
more and more complex.
Table 5. Numbers of devices needed for circuits with various latch sizes to generate 128 outputs.
Let’s choose a couple of desired configurations and
look at the detailed circuits and software. Two that I’m
currently adding to 68HC11 systems for robotic use will go
from eight system outputs to 24 outputs and from 11
system outputs to 64 outputs. We will then go on to detail
how to use these in the supporting software. Of course, my
hope is that you can take the information presented here
and customize it to build up the desired circuit and software
for your particular application.
in Software Listing 1 (available at www.nutsvolts.com).
Anything after a “;” sign is a comment, used to describe
Eight Outputs to 24 Outputs
The program to drive the miltiplexer circuit is
organized as a method that is called to set the entire 24-bit
number. The application program
just calls this method whenever it
wants to change these outputs. The
pseudo code for this is what we saw
before. The hardware requires a
two-bit address and a six-bit data
value. Let’s assume this is connected
to the B port on the 68HC11, which
resides at address $1004.
The software to do this in
68HC11 assembly language is shown
11 Outputs to 64 Outputs
Building on the ideas we’ve discussed, here is a nine-chip solution to expanding 11 system outputs (three
address and eight data) to 64 outputs. It uses a single
74HC138 decoder and uses the eight lines from it to drive
eight eight-bit latches for a total of 64 bits.
The circuit can be easily wired up from the connections
in Figure 7 and the software will be an expansion of the
code for the 10-to- 32 multiplexer circuit in Software Listing
2 (view it at www.nutsvolts.com).
About the Author
Tom Dickens is an
engineer and Associate
Technical Fellow at The
Boeing Company. He
maintains a website of
68HC11 information and
examples at http://tom
We have discussed the technique
of expanding a small number of digital
outputs into a very large number of
outputs. We have considered the
available off-the-shelf devices commonly used to implement a multiplexer
circuit, which, in turn, dictates the
practical limits to these designs. NV
Order online at:
Development Tools for PICmicro MCUs
microEngineering Labs, Inc.
Phone: (719) 520-5323
Fax: (719) 520-1867
Colorado Springs, CO 80960