Today, you will design and begin to implement a 4-bit binary counter. This is a two week project. It is likely that you'll spend most of today's lab time solving the problem of how this sequential logic circuit will work, and you will not finish building that circuit until next week. Be sure to read the whole lab before you start working!
Your goal is to build a 4-bit binary counter. More specifically, you want a circuit that is built around 4 1-bit memory elements, where each element holds one of the bits of the counter. The 4 bits (that is, the contents of the 4 memory elements) should be connected to LEDs so that you can see the current number in the counter.
This counter should depend on a clock. When the clock is cycled (made to be high and then low again), the counter should increment by one. When the counter reaches the binary value 1111, at the next clock cycle, it should "wrap around" to 0000.
When the clock is cycled, the new values that are to be stored in the memory elements must be determined by the old values that are coming out of the memory elements. That is, you must build circuitry that determines what the value of each bit will next be, when the clock is cycled, based on the current values of the bits.
There are new devices that you will need in order to complete this lab:
Here are some useful ideas that will be help in designing and implementing your counter. Be sure to read these carefully!
Creating a clock: You should begin by making a clock circuit, which you will use to drive the clock line on the 273 chip. The clock will itself be a memory element --- specifically, an SR latch. You will want to use pushbuttons to control both the S and R lines of this latch, thus allowing you to alternate between buttons when you want to cycle the clock. Note that pressing the buttons will make the Q output alternately high and low --- exactly what we need in a clock line. This kind of circuit is known as a debounced switch. (No, I do not know the etymology of that term.)
Note that you should invert the pushbuttons with NOT gates before connecting them to the latch input lines. Recall that when a pushbutton is not being pressed, that line is open, and will thus behave as though it is high (i.e. powered). However, the latch is closed when its inputs are low. Thus, we need to invert those pushbuttons in order to have them control the latch correctly, opening it when a button is pressed.
Incrementally building up the counter: Don't try to design or wire all 4 bits of your counter at once! That would be like writing a large program without compiling and debugging the small parts...and we wouldn't want to do that now, would we?
Begin by building a 1-bit counter; yes, one that simply alternates between 0 and 1. Figure out the input to this single memory element based on its own current output.
Graduate to a 2-bit counter. Here, you'll have two inputs, D0 and D1, and their two corresponding outputs, Q0 and Q1. Figure out what the input for D1 should be based on the current Q0 and Q1 values.
Design and test these smaller circuits! You may find that something is wrong with your design, and it will be easier to fix with the smaller cases. Once you have ensured that you've got the right idea, you can work your way up to a full, 4-bit counter.
The usual rules for finishing your work apply: