LAB06 Student - Lab 6 questions PDF

Title LAB06 Student - Lab 6 questions
Course Introduction To Electrical And Computer Engineering
Institution Carnegie Mellon University
Pages 9
File Size 479.8 KB
File Type PDF
Total Downloads 9
Total Views 129

Summary

Lab 6 questions...


Description

Finite State Machines

In this lab, students will implement a finite state machin e from its state t ransition diagram usin g flip-flops and NAND gates. The two-bit in put to the FSM will be connected to a temperature sensor circuit.

6

_

_ Bench#:

Name: 6.1 Pre Pre-- Lab

The state transition diagram for the FSM is shown below. It is a temperature indicator that blinks as a warning when the temperature is slightly too high, and remains lit when the temperature is dangerously high. The input to the FSM is a two -bit number, S 1S 0 . The output, Q, is our present -state and is one bit and is connected to an LED. When both inputs are 0, the LED is off. When S1S 0 = 01, the LED blinks. When S1S0 = 11, the LED remains on all the time. S1S 0 = 10 is an error state which should never be entered, but if this does hap pen the LED should return to its default off state. We are designing the logic for the flip -flop input D , which is our next- state, which will be based on the values of present-state Q and the current values of S 1S0. On the next rising edge of the clock, D will be moved to Q and become the new present- state.

init

S1 = X S0 = 1

Q=0

S1 = X S0 = 0

S1 = 1 S0 = 1

Q=1

S1 = 0 S0 = X Fig 6.1 State Transition Diagram

LAB 06: Finite State Machines (Student Version)

2/9

➤Pre-lab 1: Use the state transition diagram to fill out the truth table below. S1

S0

Q

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

D

➤Pre-lab 2: Fill in the k- map for t he n ext stat e logic. Q 0

1

00

S1S0

01 11 10

LAB 06: Finite State Machines (Student Version)

3/9

➤Pre-lab 3: Write the SOP expression for D as a fun ction of ฀฀1 , ฀฀1 , ฀฀0 , ฀฀0 , ฀฀, an d ฀฀.

You will be using t he 4013 D flip- flop an d the 4023 3- input NAND gate to construct the circuit. The pinouts of these two chips are shown on the n ext page. Th e set and reset lines of t he flip flops should be conn ected to groun d. ➤Pre-lab 4: If you want to use a 3 - input NAND gate as a 2 - in put NAND gate or an in verter, how should the un used inputs be con nected? Draw them in th e space below.

INV

LAB 06: Finite State Machines (Student Version)

NAND2

4/9

Fig. 6.2 Chip Pinouts ➤Pre-lab 5: Draw th e schem atic for the complete FSM circuit below. Your schemat ic should

LAB 06: Finite State Machines (Student Version)

5/9

only contain symbols for D flip- flops and 3- input NAND gates. Label all pin numbers on t he schematic.

LAB 06: Finite State Machines (Student Version)

6/9

6.2 In Lab 6.2.1 FSM Construction Build the circuit you designed in the pre

-lab. Since you don’t have the temperature sensor

output yet, use switches to generate the inputs S 1 and S 0. Connect an LED to the flip - flop output as shown in figure 6.4. Remember the cathode (negative side) of th e LED is the shorter side of the LED. In this figure 6.4 below, the cathode is facing towards ground.

Fig. 6.4 FSM Output

Fig. 6.3 FSM Switches Set your function generator to produce a 1Hz 5V peak -to- peak square wave with a 2.5V offset. Power your circuit and connect the function generator to the clock input. Test that the FSM works as expected for all switch input combinations. check - off. ☐TA Initials: _______________

Once your circuit

works, see a TA for

6.2.2 Temperature Sensor Circuit The temperature sensor uses an internal diode to measure temperature, which causes its output voltage to vary. It will be connected to two op - amp comparators, one with a reference voltage of 1.4V and the other with a reference voltage of 1.8V. These correspond to external temperatures of roughly 50℃ and 70℃ and will be used as 0Sand S1 respectively.

LAB 06: Finite State Machines (Student Version)

7/9

The schem atic for the en tire t emperature sensor conditioning circuit is shown in figure 6.5. The variable resistor labeled “RTV” represents a variable resistor and RTF is a fixed resistor. These combine such that Vout varies with temperature. (R2 and R4) such that the V

in -

You will need to tune the potentiometers

to the op - amps are at the desired values

. The pinouts of the

op- amp chip can also be found in figures 6.6 and 6.7. Note that there are two op - amps in each chip. The potentiometers in figure 6.5 are differently drawn than other circuits we have seen thus far. Connect them to the circuit using pins 1 and 2, or 2 and 3. We want them to function as a variable resistor, changing the dial setting will change the resistance through them on the diagram. Pay extra attention to the orientation of figure 6.7. temperature sensor faces out from the page.

The flat part of the

Fig. 6.5 Comparator Schematic

LAB 06: Finite State Machines (Student Version)

8/9

Fig. 6.6 MCP6002 Pinout

Fig. 6.7 Temperature Sensor Pinout

6.2.3 Integration Connect the outputs of the comparators to the inputs of the FSM in place of the switches you used in 6.3.1. See a TA for checkoff. ☐TA Initials: _______________

LAB 06: Finite State Machines (Student Version)

9/9...


Similar Free PDFs