DOC PREVIEW
PSU EE 200 - midterm_f12

This preview shows page 1-2-21-22 out of 22 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

blanksolutionsEE 200 Midterm Exam 25 October 2012Last Name (Print):First Name (Print):ID number (Last 4 digits):Section:DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SOProblem Weight Score1 342 333 33Total 100INSTRUCTIONS1. You have 2 hours to complete thi s exam.2. This is a closed book exam. You may use one 8.5”× 11” note sheet.3. Calculators are allowed.4. Solve each part of the problem in the space fol lowing the question. If you need more space, continue your solutionon the reverse side labeling the page with the question number; for example, Problem 1.2 Continued. NOcredit will be given to solutions that do not meet this requirement.5. DO NOT REMOVE ANY PAGES FROM THIS EXAM. Loose papers will not be accepted and agrade of ZERO will be assigned.6. The quality of your analysis and evaluation is as important as your answers. Your reasoning must be preciseand clear; your complete English sentences should convey what you are doing. To re ceive credit, you mustshow your work.1Problem 1: (34 Points)1. (24 points) Turnstiles, like the one shown in Figure 1, control access and enforce one-way traffic of peoplein settings such a s amusement parks, stadiums, mass transit stations, and ski resorts. Initially, the arms arelocked, preventing customers from passing through. Depositing a coin or token in a slot on the turnstile unlocksthe arms so they can rotate by one-third of a complete turn, allowing a single customer to push through. Afterthe customer passes through, the arms lock again until ano ther coin is inserted.In this problem you will represent the operation of the turnstile using a finite state machine. Two states,Locked (S0) and Unlocked (S1), describe the operation of the turnstile. Two digital inputs affect the state ofthe Turnstile. Placing a coin in the turnstile sets the coin input sig nal, C, to the logic-high state (C = 1).Pushing the arm forward sets the push input signal, P , to the logic-high state (P = 1). The system has asingle output sig nal, L. When L is set to a logic- high state, L = 1, the turnstile gate is locked, and when L isset to a logic-low state, L = 0, the gate is unlocked.In the locked state, pushing on the arm ha s no effect. R ega rdless of how many times the user pushes the arm,the turnstile remains locked. Putting a coin in shifts the state from Locked to Unlocked. In the Unlocked state,putting additional coins in has no effect, the system remains in the unlocked state. However, when a customerpushes through the arms, the state shifts back to Locked.Figure 1: Waist-high turnstile2(a) (12 points) Represent the operation of the turnstile using a Moore finite state machine by sketching thestate diagram. To receive full credit, label the states as S0 and S1, show the state of the output signal L,and the value of the inputs C and P .(b) (12 points) Construct the state table.32. (10 points) Figure 2 shows the implementation of two different finite state machines. For each finite statemachine, specify the maximum number of possible states and state whether the implementation is that of aMoore or Mealy machine. Justify your answers using one or two short sentences.(a) (5 points) Machine in Figure 2(A):• Maximum number of possible states:• Machine type (Moore or Mealy):(b) (5 points) Machine in Figure 2(B):• Maximum number of possible states:• Machine type (Moore or Mealy):4Figure 2: Two separate finite state machines5Problem 2: (33 Points)Figure 3 shows the state tabl e for a Moore finite state machine with input x and output y.Figure 3: State table for a Moore finite state machi ne1. (5 points) Sketch the state diagram. To receive full credit, label the states, show the state of the output signaly, and the value of the input signal x.62. (14 points) Suppose we implement the finite state machine with two D-type flip-flops. Using the state tablein 3, determine expressions for the flip-flop inputs and the finite state machine output using a three-variableKarnaugh map. For each flip-flop input and the finite state machine output, draw a separate three-variableKarnaugh map using Figure 4 as a gui de.7Figure 4: Three variable Karnaugh map83. (14 points) Realize the finite state machine using two D-type flip-flops and two-input NAND gates. Neatlydraw a circuit diagram of your implementation.9Problem 3: (33 Points)As an example, Fi gure 5 shows the data-flow code for implementing a finite-state machine using the ATMEL 750CLprogrammable logic devi ce. Using Figure 5 as a guide, write dataflow code for implementing the finite state machinein Figure 6. Assign the clock to pin 1, the input to pin 2 and the output to pin 23 . Set the reset (clear) and setinput of all D-type flip-flops to zero. With reference to Figure 6, label the D-type flip-flop outputs, from left to right,as QA through QD. Do not include the header information in your code, but you must include comment lines toimprove the readability of your code.10Figure 5: Example dataflow codeFigure 6: Finite State


View Full Document

PSU EE 200 - midterm_f12

Download midterm_f12
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view midterm_f12 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view midterm_f12 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?