CSCI 232 Lab #7
Build Your Own
Controller
Date Due: 14 March 2012
This
week we are going to build some control circuits for our hypothetical computer
we are designing. (What, you say? You
didn’t know we were designing a computer?
Well, look at the past couple of labs…first we did ALU things, and then
we did memory things. This week we are
going to do CPU control kinds of things.)
One
thing processors need is to know what state they are in, since that controls
what operations are currently occurring.
You are to build a shift register using 8 flip flops that contain a
single 1 and the rest zeroes. As your
clock drives the flip flops, you are to shift the 1 from one flip flop to the
next, and when it shifts off the right end, you are to put it back in on the
left. The output of each flip flop
should connect to one of the LED’s so you should see a single green LED
apparently work its way across the display until it reaches the right end, at
which point it should reappear on the left.
For extra credit, add additional circuitry such that when an input
switch is high, the shift register resets to the initial state (1 in the left
flip flop) on the next clock.
A
second useful circuit is a frequency divider, since we often need to generate
lower clock frequencies from higher ones.
This is easy to do if you want to simply divide by a power of 2, but
what if we need a different subharmonic? You are to design and implement a circuit
that uses three switches to set the divider from 2 through 7 and divides the
input clock by the corresponding amount.
You should hook the clock to one LED, and the output to another, so that
it will be easy (for low clock frequencies) to determine what the current
divisor is.