1 ENGG 1203 Tutorial Sequential Logic (II) and Electrical Circuit (I) 22 Feb Learning Objectives  Design a finite state machine  Analysis circuits through.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Adders Used to perform addition, subtraction, multiplication, and division (sometimes) Half-adder adds rightmost (least significant) bit Full-adder.
1
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Sequential Logic Design
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Order of Operations Lesson
Break Time Remaining 10:00.
Chapter #8: Finite State Machine Design Contemporary Logic Design
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
Basic Laws of Electric Circuits Kirchhoff’s Voltage Law
Chapter 3 Basic Logic Gates 1.
Chapter 4 Gates and Circuits Nell Dale • John Lewis.
Chapter 4 Gates and Circuits.
Discrete Mathematical Structures: Theory and Applications
Digital Systems Introduction Binary Quantities and Variables
Digital Logical Structures
Digital Logic Design Gate-Level Minimization
Chapter 4 Gates and Circuits.
Chapter 4 Gates and Circuits.
Direct-Current Circuits
Copyright © 2013, 2009, 2006 Pearson Education, Inc.
Copyright © 2013, 2009, 2006 Pearson Education, Inc. 1 Section 5.5 Dividing Polynomials Copyright © 2013, 2009, 2006 Pearson Education, Inc. 1.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
Chapter 1: Expressions, Equations, & Inequalities
1..
© 2012 National Heart Foundation of Australia. Slide 2.
Adding Up In Chunks.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Mrs. Rivas International Studies Charter School. Worksheet Practice 7-1 to 7-5Section 7-1 Algebra Solve each proportion.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Subtraction: Adding UP
What is the value of this coin? How much change is here? 6.
Finite-state Recognizers
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Clock will move after 1 minute
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Energy Generation in Mitochondria and Chlorplasts
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Circuitry formulas Ch5 Bushong RT 244 – 12 Lect # 3.
EMLAB 1 Chapter 2. Resistive circuits
FIGURE 3-1 Basic parts of a computer. Dale R. Patrick Electricity and Electronics: A Survey, 5e Copyright ©2002 by Pearson Education, Inc. Upper Saddle.
1 ENGG 1015 Tutorial Circuit Analysis 5 Nov Learning Objectives  Analysis circuits through circuit laws (Ohm’s Law, KCL and KVL) News  HW1 deadline (5.
1 ENGG 1015 Tutorial Digital Logic (II) (70 pages) 15 Oct Learning Objectives  Learn about Boolean Algebra (SoP/PoS, DrMorgan's Theorem, simplification),
1 ENGG 1203 Tutorial Combinational Logic (II) and Sequential Logic (I) 8 Feb Learning Objectives  Apply Karnaugh map for logic simplification  Design.
Presentation transcript:

1 ENGG 1203 Tutorial Sequential Logic (II) and Electrical Circuit (I) 22 Feb Learning Objectives  Design a finite state machine  Analysis circuits through circuit laws (Ohm’s Law, KCL and KVL) News  HW1 (Feb 22, 2013, 11:55pm) Ack.: ISU CprE 281x, HKU ELEC1008, MIT 6.111, MIT 6.01

2 Quick Checking NOT always true Always True If, then

A FSM design for a Vending machine (Revisited) Vending Machine  Collect money, deliver product and change Vending machine may get three inputs  Inputs are nickel (5c), dime (10c), and quarter (25c)  Only one coin input at a time  Product cost is 40c  Does not accept more than 50c  Returns 5c or 10c back  Exact change appreciated 3

Solution We are designing a state machine which output depends on both current state and inputs. Suppose we ask the machine to directly return the coin if it cannot accept an input coin. Input specification: I 1 I 2  Represent the coin inserted  00 - no coin (0 cent), 01 – nickel (5 cents), 10 – dime (10 cents), 11 – quarter (25 cents) Output specification: C 1 C 2 P  C 1 C 2 represent the coin returned – 00, 01, 10, 11  P indicates whether to deliver product – 0, 1 4

Solution States: S 1 S 2 S 3  Represent the money inside the machine now  3 bits are enough to encode the states S00 (0 cents) – 000 S05 (5 cents) – 001 S10 – 010 S15 – 011 S20 – 100 S25 – 101 S30 – 110 S35 – 111 5

Solution 6

7 S35 11/110  S35 10/011  S00 01/001  S00 11/110 11/000 01/000 10/000 S35: Currently the machine has 35 cents e.g. 11/110 : If we insert a quarter (11), then the machine should return one quarter and zero product (110)  35c (35 cents inside the machine now) + 25c (insert 25 cents) = 35c (35 cents inside the machine in the next state) + 25c (return 25 cents) + 0c (return no product) Input Output Next state 00/000  S35

Solution 8 S35 11/110  S35 10/011  S00 01/001  S00 11/110 11/000 01/000 10/000 e.g. 10/011: If we insert a dime (10), then the machine should return one nickel and one product (011)  35c (35 cents inside the machine now) + 10c (insert 10 cents) = 0c (zero cent inside the machine in the next state) + 5c (return 5 cents) + 40c (return one product) e.g. 01/001: If we insert a nickel (01), then the machine should return zero coin and one product (001)  35c (35 cents inside the machine now) + 5c (insert 5 cents) = 0c (zero cent inside the machine in the next state) + 0c (return zero cent) + 40c (return one product) 00/000  S35

A Parking Ticket FSM At Back Bay garage, Don and Larry are thinking of using an automated parking ticket machine to control the number of guest cars that a member can bring. The card reader tells the controller whether the car is a member or a guest car. Only one guest car is allowed per member at a discount rate only when s/he follows out the member at the exit (within the allotted time). The second guest must pay the regular parking fees. You have been hired to implement the control system for the machine which is located at the exit. Using your expertise on FSMs, design a FSM for the control system. 9

Solution Specifications  Signals from the card reader: MEMBER and GUEST  Signals from the toll booth: TOKEN (meaning one toke received), EXP (time for discounted guest payment has expired).  Signal to the gate: OPEN.  Fee: Members are free, Guest with a Member is 1 Token, Regular Guest is 2 Tokens. 10

11

Solution The truth table that corresponds to the FSM  The state labels can be mapped to a three bit state variable. All entries not entered below are illegal. 12

Solution 13

14 Rules Governing Currents and Voltages Rule 1: Currents flow in loops  The same amount of current flows into the bulb (top path) and out of the bulb (bottom path) Rule 2: Like the flow of water, the flow of electrical current (charged particles) is incompressible  Kirchoff’s Current Law (KCL): the sum of the currents into a node is zero Rule 3: Voltages accumulate in loops  Kirchoff’s Voltage Law (KVL): the sum of the voltages around a closed loop is zero

15 Parallel/Series Combinations of Resistance To simplify the circuit for analysis Series Parallel

16 Voltage/Current Divider  Voltage Divider Current  Divider

17 Question: Potential Difference Assume all resistors have the same resistance, R. Determine the voltage v AB.

18 Solution Determine V AB We assign V G =0

For the circuit in the figure, determine i 1 to i Question: Current Calculation using Parallel/Series Combinations

20 Solution (i) (iii) (ii) (iv) We apply:  V = IR  Series / Parallel Combinations  Current Divider

21 Solution (v) (vi) (vii)

22 Analyzing Circuits Assign node voltage variables to every node except ground (whose voltage is arbitrarily taken as zero) Assign component current variables to every component in the circuit Write one constructive relation for each component in terms of the component current variable and the component voltage Express KCL at each node except ground in terms of the component currents Solve the resulting equations Power = IV = I 2 R = V 2 /R

23 R 1 = 80Ω, R 2 = 10Ω, R 3 = 20Ω, R 4 = 90Ω, R 5 = 100Ω Battery: V 1 = 12V, V 2 = 24V, V 3 = 36V Resistor: I 1, I 2, …, I 5 = ? P 1, P 2, …, P 5 = ? Question: Circuit Analysis Step 1, Step 2

24 Solution a V N = 0 I 1 : M  R 5  V1  R 1  B I 2 : M  V 3  R 3  R 2  B I 4 : M  V 2  R 4  B Step 1, Step 2

25 Solution a V M – V B = R 5 I 1 + V 1 + R 1 I 1 I 1 = (V M – V B – V 1 )/(R 5 + R 1 ) = (24 – V B )/180 Step 3

26 Solution a V N – V B = R 2 I 2 + R 3 I 2 I 2 = (V N – V B )/(R 2 + R 3 ) = – V B /30 Step 3

27 Solution a V M – V B = V 2 + R 4 I 4 I 4 = (V M – V B – V 2 )/R 4 = (12 – V B )/90 We get three relationships now (I 1, I 2, I 4 ) Step 3

28 Solution a KCL of Node B: I 1 + I 4 + I 2 = 0 (24 – V B )/180 + (12 – V B )/90 – V B /30 = 0  V B = 16/3 V Step 4, Step 5

29 Solution a I 1 = (24 – V B )/180 = 14/135 A = 0.104A I 4 = (12 – V B )/90 = 2/27 A = 0.074A I 2 = – V B /30 = – 8/45 A = – 0.178A Step 5

30 Solution a P = I 2 R = P 1 = (0.104) 2 80 = W P 4 = (0.074) 2 90 = W = V R4 2 / R (6.66V, 90Ω)

31 Quick Checking NOT always true Always True If, then

32 Quick Checking NOT always true Always True If, then √ √ √ √ √

(Appendix) Boolean Algebra 33

(Appendix) Boolean Algebra 34

35 (Appendix) Question: Voltage Calculation Find V 2 using single loop analysis  Without simplifying the circuit  Simplifying the circuit

36 Solution Choose loop current Apply KVL  Replace V 2 by R 2 I Find V 2

37 Solution Simplify the circuit with one voltage source and one resistor R eq. = R 1 + R 2 + R 3 = 7 ohm V eq. = V s1 + V s2 + V s3 = = 2 V I = V eq. / R eq. = 2/7 A V 2 = 4/7 v