EE 231
Prelab 7: Debouncing Switches with an SR Latch

  1. How many inputs/outputs does the SR Latch have?

  2. Complete the truth table of an SR latch.
    S R Qprevious     Qpresent 
    0 0

    0

       
    0 0

    1

       
    0 1

    0

       
    0 1

    1

       
    1 0

    0

       
    1 0

    1

       
    1 1

    0

       
    1 1

    1

       

    and thus derive the expression for:

    Qpresent =

  3. Redesign the circuit shown in Figure 10.48(b) of Brown to use NOR gates.

    - How should we change the resistors connected between the inputs and Vdd (i.e. +5V)?
    - Anything else to change?



  4. Section 2. of the lab requires that you determine all possible transitions of RS values. Noting that 00 -> 10 is different from 10 -> 00, how many distinct transitions are possible? The diagram below might be a helpful starting point.
    00
    01 10
    11
  5. Next you will create a .wdf file to provide the stimulus required for Section 2. of your lab. Copy the file n:\ee231\prelab7.wdf to your local u:\ee231\lab7\ directory. Open this file in Altera. The two outputs, OP0 and OP1, represent the desired signals (R and S) that you will use to test all possible transitions (which you determined in part 4.). The outputs, as shown, generate the sequence (OP1 OP0) = 00,01, 00, 10, 00, 11, 00, 00, 01, ... which does NOT represent all possible transitions. Edit the output waveforms to generate the transition sequence you derived in part 4. To learn how to create a .wdf file see: "Creating a Waveform Design File" in the Altera help menu.

    When you have finished editing the outputs save and check the project (from the File -> Project menu) then Create a Default Symbol (from the File menu).

  6. Test your new symbol by creating a new project (with a NEW project name!!) and using the symbol in a .gdf file . Simulate your stimulus generator and print the waveforms it generates..