Table 3. Gray code for a two-bit number cycling
from top to bottom.
flip-flop as line Y0 goes from LOW to HIGH. Also note that
Y1 will now be LOW.
4. Set the data values V11-V6 on data lines O7-O2.
5. Set the address lines O1-O0 to HH. (Remember, we
need to use Gray code!) This causes the data values to be
captured in the second flip-flop.
6. Set the data values V23-V18 on data lines O7-O2.
7. Set the address lines O1-O0 to HL. This causes the data
values to be captured in the forth flip-flop.
8. Set the data values V17-V12 on data lines O7-O2.
9. Set the address lines O1-O0 to LL. This causes the data
values to be captured in the third flip-flop.
Of course, in your system, you would write a subroutine
to do this, so your program would just invoke the subroutine
to get the job done. What does this software look like? How
does it do the eight steps detailed above?
Listing 1 (view it at www.nutsvolts.com) shows a
detailed assembly language program for the 68HC11.
The operations used are bit-level manipulations, such as
bit-shifting, bit-masking, bit-setting, and bit-clearing. You
can accomplish these operations using mathematic
operations, but the clearest way to do these operations is
to use the bit-level operations in your system. (I’ll bet you
always wondered what they were and why anyone would
ever want to use them!) In assembly code, these
operations are the logical shift and bitwise AND, OR, and
NOT operators. In C, C++, and Java, look at the shift (<<
>>) operations and the bitwise (| & ∧) operators.
We’ve seen the theoretical fan-out we can achieve, but
let’s consider the common building blocks and what would
be practical to build and use. We could use devices without
using all of their capabilities, but — if you’re building an
external circuit for your system — you would want to keep
Learn at home in your
Earn up to
$100 an hour
No previous experience needed!
You can earn more money
if you get an FCC License!
Not satisfied with your present income?
Add prestige and earning power to your
electronics career by getting your FCC
The Original Home-Study course prepares you for the “FCC Commercial
Radiotelephone License” at home in your
This valuable license is your professional
“ticket” to thousands of exciting jobs in:
Communications, Radio-TV, Microwave,
Maritime, Radar, Avionics & more…you
can even start your own business!
No need to quit your job or go to school.
This proven “self-study” course is easy,
fast and low cost!
GUARANTEED TO PASS – You get your
FCC License or your money will be refunded.
Call for FREE facts now!
(800) 932-4268 Ext. 220
FCC LICENSE TRAINING - Dept. 220
P.O. Box 3000 • Sausalito, CA 94966
Please rush FREE details immediately!
City State Zip
Circle #117 on the Reader Service Card.