Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Other Engineering Expert

DIGITAL SYSTEMS

LAB: COUNTER DESIGN

Objective: Given a desired counting sequence, design and build the counter using flip-flops and gates. Derive the flip-flop input equations using a state table and K-maps

Preparation (Pre-lab)

o Do the complete paper design for the counter specified in Design I. Your paper design must include the following items:
o State transition table for the counter
o K-maps for each of the flip-flop input equations.
o Minimized sum of products (SoP) equation for each flip-flop input signal.

Description

In this lab, you will design a unique counter that implements the state diagram shown in the figure below. Each student will be given an individualized count sequence to implement. The count values X1 - X6 shown in the figure will be some sequence of the numbers 1 - 6, with each number used only once. This circuit will simulate rolling a die.

1074_Counter State Diagram.jpg
Figure 1. Counter State Diagram

Note that the counter has an input, Rb, which stands for "Roll button". The counter counts as long as Rb = 1, but when Rb = 0 the counter maintains the last count value.

There is one other possible state in a 3-bit counter design. For example if X1 to X6 correspond to state bits 001 to 110 and the reset state corresponds to state bits 000, the "missing" state has state bits 111. It is possible that the state machine could power-up in this state. If so, you must guarantee that the state machine does not remain stuck in this state, even when the reset switch is not pressed. Thus, the next state assignment from the missing state must be to one of the states in the count sequence, X1 to X6, or the reset state.

Design I. Moore Machine with the State Bits as the Outputs

Design the counter as a Moore machine where the state bits serve as the count outputs.

a) Draw a state transition table and derive the input equations for implementing the counter using D flip-flops and logic gates.

b) Enter your design in Quartus II. Use the 7474 or the DFF component for the D flip-flops, the 7447 component for the seven-segment display logic, INPUT and OUTPUT components and basic logic gates (AND, OR, NOT, etc.) Use an SW toggle switch for Rb and a KEY pushbutton switch for Reset. Display the output on HEX0 and turn off all the segments on HEX1-HEX7. This circuit should be clocked by the 27 MHz or 50 MHz clock signals available on the Altera DE2 board.

c) Verify your design by simulating in ModelSim. Print a copy of your simulation waveforms for one complete cycle for your lab report. Set the radix to Hex for the seven- segment output signal. Have your TA verify your simulation.

NOTE: In order to avoid timing violations in your gate-level simulation, you may need to make the first edge of the clock signal a fall edge rather than a rising edge as shown below.

1893_Rising Edge.jpg

You should simulate with a clock period of 100 ns and run the simulation for 100 ns each step.

Design II. Mealy Machine

Design the counter as a Mealy machine. Do a complete paper design. However, you do not need to enter your design as a Quartus schematic or simulate your design. Compare the number of gates required for the Mealy machine with the number required for the Moore machine in Design I.

Implementation of Design I

Once your simulation for Design I works, download your design to the DE2 board and verify that your circuit works. Don't forget to import the pin assignments!! The output will change too fast to observe the sequence while the counter is counting, but you should observe that the counter stops on numbers 1 to 6 with about equal probability. If the die seems to be ‘unfair', check your simulation and your circuit carefully. Another debugging technique is to test your circuit with a slow clock so you can see the count sequence. (This circuit will be used as part of the final lab, so save your project files.) Have your TA verify your working circuit.

Lab Report

Each individual will be required to submit a lab report. Use the format specified in the "Lab Report Requirements" document available on the class web page. Be sure to include the following items in your lab report:

Q Lab cover sheet with TA verification for circuit simulation and performance
Q Graded pre-lab
Q Logic design documentation (truth table, K maps, logic equations) for both designs
Q Quartus II schematics for Design I
Q ModelSim simulation waveforms for Design I Answer the following questions in your Lab Report:

Q1: Compare Design I and Design II of the sequential circuit. Describe any advantages or disadvantages of the Moore design for this circuit.

Q2: A third design for the counter circuit might use a Moore machine where the state bits were not used as the outputs. For example, the state bits might be the binary count sequence 0 - 6.

How would this design would with Designs I and II (assuming your assigned count was not the straight binary count sequence 1 to 6)? Which design is likely to require the fewest gates? Justify your answer.

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M91939204
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in Other Engineering

Register design a cpu register is simply a row of

Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required. For example, an 8 bit register has 8 flip-flops side by side for stor ...

Homework - risk and decision management1 you are working

Homework - Risk and Decision Management 1) You are working program X. The total budget allocated to the program is $100 M and it is to be completed in 24 mo. range (R) and passenger capacity (C) are two key performance p ...

1 online discussion forum - post your proposed topic and

1. Online Discussion forum - Post your proposed topic and chosen data set as well as a short plan for the project. This is required for approval of the topic. As discussed, students must select unique topics, therefore i ...

Part 1configure verify and troubleshoot wan links and ip

Part 1 Configure, verify and troubleshoot WAN links and IP services Answer to all questions below: 1. What is the name of the Safe Work Australia code of practise that provides guidance on how to manage the risks of elec ...

Assignment -problem 1 - given is the lcc difference

Assignment - Problem 1 - Given is the LCC difference equation that represents some LTI system: y(n) - ¾y(n-1) - ¼y(n-2) = x(n) + x(n-1)   a) Find the impulse response of the system (solve the LCCDE). b) Draw a block diag ...

Projection of planes1 a regular pentagon of 25 mm side has

Projection of Planes 1. A regular pentagon of 25 mm side has one side on the ground. Its plane is inclined at 45° to H.P. and perpendicular to the V.P. Draw its projections. 2. Draw the projection of a circle of 50 mm di ...

This is your second design assignment this assignment

This is your second design assignment. This assignment requires you to design a complex state machine. You are designing a digital alarm clock. There are various designs you can attempt. More complex designs are worth mo ...

Mine safety amp environmental engineeringpart 1 questions1

Mine Safety & Environmental Engineering Part 1. Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the following terms ...

Engineering analysis assignment -for every problem provide

Engineering Analysis Assignment - For every problem, provide The MATLAB script/function files that solve the problems. Problem 1: Plot the function f(t) = (x+5) 2 /(4+3x 2 ) for -3 ≤ x ≤ 5. using plot command. Use the ar ...

Mine safety amp environmental engineeringpart 1 questions1

Mine Safety & Environmental Engineering Part 1. Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the following terms ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As