


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Professor: Osery; Class: Digital Electronics Lab; Subject: Electrical Engineering; University: New Mexico Institute of Mining and Technology; Term: Fall 2008;
Typology: Lab Reports
1 / 4
This page cannot be seen from the preview
Don't miss anything!



In this lab you will design a sequential circuit to test your reaction speed. The basic idea is that you hit a switch as soon as you see an LED light up. The amount of time you took to react will be displayed on two 7-segment displays. Figure 1 shows the overall circuit that you will design and build. You will use a clock clk to drive a two digit counter, the w signal will be a pulse that lights the LED. The LED will turn off as soon as you hit the switch, and the signal Reset can be used to reset the counters, the display and get the circuit ready to start over.
7−Seg Decoder
Enable
Reset
Two Digit BCD counter
7−Seg Decoder 1
0
Q’
D Q
Vcc Vcc
w
1
Reset
clk
Figure 1: Circuit for testing your reaction speed.
1 Prelab 2
2 Lab 2
3 Supplementary Material 3 3.1 Verilog................................. 3 3.1.1 Sequential HDL........................ 3
Program 1 An example a D flip-flop with asynchronous reset. module D_flip_flop( output reg Q, input D,clock,reset );
always @(posedge clock, negedge reset) if (~reset) Q<=1’b0; else Q<=D; endmodule