EE 370 Lab 7

Clocked Stack Controller

Background on Stacks

A stack is a first-in, last-out data structure; that is, the last item to be placed on it will be the first item taken from it. This is very similar to the way plates are placed and taken from a stack in a kitchen cupboard.

In this lab, a controller will be constructed for a post-increment, pre-decrement RAM-based data stack. When an item is added, or pushed, on the stack, the value is written to memory and then the counter which generates RAM addresses is incremented. When an item is removed, or popped, from the stack, the address counter is decremented before the item becomes available.

Background on Multivibrators

Recall that there are three types of sequential circuits: monostable, bistable, and astable. Bistable circuits, more commonly called flip-flops and latches, have two stable states: 0 and 1. Monostable circuits have one stable state, but may be in the opposite state for a period of time. This results in a pulse or "one shot". Astable circuits have no stable state. They oscillate between 0 and 1; this is useful for clocking flip-flops.

The 555 timer chip is a very versatile and inexpensive circuit which can be used in applications where precision is not crucial. The 555 period/duration accuracy depends heavily on resistor and capacitor component values, which can vary up to 20% from their indicated values. The 555 behavior also varies with temperature. Crystal-based circuits are used when an exact, invariant time base is required.

The basic circuits and related information are given on the reference material available in EE 233.

Pre-lab: 15 pts

Generate a state table from the English description of the controller given below and list Boolean equations for key internal and external control signals. Use a 4-bit ring counter to generate one-hot states (see Wakerly 7.4.3). INDIVIDUALLY draw and turn in the schematic for the controller and a simulation (using PSpice) which starts the stack at address 0000, pushes 3 values, and then pops them. For the simulation use the 74190 instead of the 74191.

Stack Controller setup

Use PSpice to draw your circuits for and to test (via simulation) your 555 designs.

Your circuit diagrams, state tables, and simulation results will be collected at the start of the lab. Make a copy of the appropriate material for your own use during lab.

In-lab: 10 pts

  1. Stack Controller. Use a 74194 shift register, combinational logic, and a 74191 binary up-down counter to implement a stack controller for a 7489. The 7489 does not have to be set up for the circuit demo. The signal RESET can initialize the controller to IDLE. The controller remains in the IDLE state until DAV (Data AVailable) is asserted when the next clock pulse occurs.

    To push a value on the stack, PUSH/POP is set to 1 and DAV is asserted. In the second state, the datum is written to memory by asserting the WE (Write Enable) signal for the 7489. In the third state, the counter direction is set to UP and WE is deasserted. In the fourth state, the counter is incremented. The controller then returns to IDLE.

    To pop a value from the stack, PUSH/POP is set to 0 and DAV is asserted. In the second state, the counter direction is set to DOWN. In the third state, the counter is decremented. In the fourth state, the datum is available. The controller then returns to IDLE.

    Use a debounced push-button switch for the controller clock and slide switches for DAV, PUSH/POP, and RESET. Connect the four counter outputs, WE, and ME to LEDs.
  2. Monostable and Astable Multivibrators. Replace the push-button clock of the first part with a ~0.5 Hz 555 oscillator circuit. Use a 555 one-shot circuit to limit the time DAV is asserted to ~0.5 seconds. Connect the clock and one-shot outputs to LEDs.


Beginning of Lab
Lab home page
Course home page