Computer Science 14 -- Lab 3
Important Note:
Memory chips are very sensitive to static and
electrical ``cross talk'' on their pins. Therefore, unlike the gates
we have been using, they don't work well with inputs that are
just hanging open. No input or control pins
should be left unconnected.
If you have a chip with, say, four latches on it, and you are
only using two of them, you should connect the inputs on the unused
latches to Ground.
- It is ok to let unused outputs hang open.
- For data inputs that you want to change, use the switches at
the bottom of the breadboard.
- For control lines like CLEAR and RESET that you want to change,
you can hardwire to Vcc or Gnd (as appropriate), use a switch, or use
a Pulse pushbutton switch (bottom right of the lab workstation). Note
that most CLR and RST controls are asserted LO, which means
you send a 0 to do the operation, and a 1 to leave it alone.
- Debounced clock signals. You can't connect a clock line to
the switches on the bottom, because they generate switch bounce.
For a clean, unbouncy signal, you can either use a Pulse pushbutton or
the signal generator on the lower left side. Use TTL MODE,
set Function to the square signal, set the Range to 1x,
and start with the lowest possible Frequency. (The Amplitude
doesn't matter since you are using TTL mode).
The Lab Project
Your project is to build two registers A and B, a
function of your choice to combine their values, and a register C that
holds the result of the function. You can make the word size
anything you like, as long as it is between 2 and 8.
You can build any function you want, as long as it uses all
the bits of A and B.
You can use three LS273 chips for the registers. Each chip contain 8
D flip-flops (rising edge triggered) with a common Clock and a
Master Reset (MR). Or, you can use some number of LS73A chips (dependin
on your word size). Each chip contains two JK Flip-Flops, with
Separate Clock and Clear lines.
and Clear lines. The data sheets are attached.
Your circuit has the following input and control lines:
- A set of input lines, depending on the word size that
you have chosen. One set of input switches should go to both A and B inputs.
- A 2-bit Write Control signal (W1, W0) that determines which register,
A, B, or C, is supposed to load its input values, according to
the table below. There are three outputs for this circuit, AW, BW, and CW.
AW is 1 whenever 1 is supposed to be loaded, and so forth.
W1 | W0 | Effect |
0 | 0 | Nothing loads |
0 | 1 | Load A (AW=1) |
1 | 0 | Load B (BW=1) |
1 | 1 | Load C (CW=1) |
- A Master Clock signal MC. Combine this with the appropriate
signals AW, BW, CW so that when selected, the appropriate register can ``see''
the MC signal. Use inverters as necessary to make A and B load
on the rising edge of MC, and to make C load on the
falling edge of MC.
- Use a common Master Clear MZ line to set all the registers
to all zeros. (There is no need for this, really, but the chips have a CLEAR
input, so why not. )
The output of register C should be sent to the LED bank, so
you can see what it contains. It may be helpful for you to
send A and/or B to the LED's, (at least one bit of each, anyway),
so you can check that they are
loading properly. There are extra lamps and LEDs available in
the lab if you want to use them.
Before The Lab
Read about the project and draw out the circuit that you will
need, including pin numbers for the chips.
Once you understand what the circuit does, think about the sequence
of steps (setting switches and controls) needed to use it.
Draw a timing diagram that shows the Master Clock and the two Write Control
values, and a one-bit slice of inputs and outputs for A, B, and C.
The timing diagram should demonstrate the sequence of control
signals needed to perform the operations listed below. Be sure to label
the operations on you timing diagram with these operations.
- Load a 1 into A
- Load a 0 onto B
- Load the function result onto C
- Write a 1 onto B (or some value that will change the result C).
- Load the function result on C
Bring your circuit diagrams and your timing diagram with you to lab.
Homework for Friday
- Turn in your circuit diagram and timing diagram for the lab circuit.
- Suppose you are designing a memory chip.
The chip needs the following control lines: Address; Write
Enable, Chip Select; Output Enable; Power; and Ground.
It also needs data input and output lines. For each of the memory
sizes below, say how many pins this chip would need. Show your work, and/or
explain your reasoning.
- A 1Kx4 memory with two read ports.
- A 256x32 memory with one read port.
- Draw a circuit diagram for a 4-bit serial-input register. This
register has a common clock and one control line, X. When X=0, the
register does not change
value. When X=1, every bit in the register shifts left by one. The high-order
(leftmost) bit is lost; the low-order bit takes input from an external input
value I. The shifting occurs on the rising edge of the clock.
Once you've drawn the circuit diagram, draw a timing diagram that shows how
to send 0111 (starting on the left side) to the chip, in sequence.