Introduction

This assignment is to build a modulo 4 up/down counter.

The Assignment

Set Up The Project

Create a directory under My Projects named Assignment_04 for this project. Unzip another copy of the support files for Assignment 3 into this new directory. Change the name of DE1_Testbed.bdf to Modulo-4_Testbed.bdf, and create a new Quartus project in this directory using this schematic file as the top-level design. Create a schematic for the device, named Modulo_4_counter. The inputs to this schematic are clock, up, and dn; the only required output is Z, but for debugging, you should add two more output pins named S1 and S0. All of these I/O pins are just one bit each. Without implementing the schematic, create a symbol for it. Then edit the testbed to replace the Device Under Test symbol with this symbol for Modulo_4_counter. Edit the schematic for the testbed as follows:

Create The Project

Implementing the Modulo-4 counter is a matter of connecting two D flip-flops to the clock input, and implementing the state table (truth table for the combinational logic) developed in class on March 6. Testing is a matter of making sure the flip-flops make the correct state transitions each time you generate a clock pulse by pressing Key[3] while holding the various combinations of Key[1] and Key[0].

If you would like to get credit for an extra homework assignment, you may create another project in a directory named Assignment_04a. In it, implement a modulo-32 up/down counter using the technique outlined in class on March 11. The design would consist of five T flip-flops, each of which has a 4×1 multiplexer controlled by the up and dn inputs. Use two seven segment displays to show the current state.

The extra-credit assignment is due by midnight March 18, and will not be accepted after that. Send me a separate email to submit the extra-credit assignment.

Submit The Assignment

When you have built and tested your circuit, be sure to log out of your account so your project will be saved on the server. Then send an email message to me saying your project is ready; I will get a copy from your account on the server and check it out. Send your email to:

Christopher.VickeryATqc.cuny.edu

Be sure the Subject Line of your email says CS-343 Assignment 4, just like that, to be sure your message does not get trapped by my spam filters.

Be sure to sign your email so I can tell who sent it!