Question

In: Electrical Engineering

Using Quartus to design a stopwatch that can display tenths of seconds, minutes, and hours, with...

Using Quartus to design a stopwatch that can display tenths of seconds, minutes, and hours, with the gaps between HEX displays splitting the time units (i.e. minutes on HEX[5..4], hours on HEX[7..6]). Have the stopwatch cycle through 3 states of a state machine with a pushbutton. The 3 states are counter-clear, counter-start, and counter-stop

Solutions

Expert Solution

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity real_time_clock is
port (clk1 : in std_logic;
seconds : out std_logic_vector(5 downto 0);
minutes : out std_logic_vector(5 downto 0);
miliseconds: out std_logic_vector(4 downto 0);
hex0,hex1,hex2,hex3,hex5,hex5 (o to 6)
);
end real_time_clock ;

architecture Behavioral of real_time_clock is
signal sec,min,mili : integer range 0 to 60 :=0;
signal count : integer :=1;
signal clk : std_logic :='0';
begin
seconds <= conv_std_logic_vector(sec,6);
minutes <= conv_std_logic_vector(min,6);
miliseconds<= conv_std_logic_vector(mili,5);

--clk generation.For 100 MHz clock this generates 1 Hz clock.
process(clk1)
begin
if(clk1'event and clk1='1') then
count <=count+1;
if(count = 50000000) then
clk <= not clk;
count <=1;
end if;
end if;
end process;

process(clk) --period of clk is 1 second.
begin

if(clk'event and clk='1') then
sec <= sec+ 1;
if(sec = 59) then
sec<=0;
min <= min + 1;
if(min = 59) then
hour <= hour + 1;
min <= 0;
if(hour = 23) then
hour <= 0;
end if;
end if;
end if;
end if;

end process;

end Behavioral;


Related Solutions

Design a clock display to show the time in hours, minutes, and seconds. Assume that we...
Design a clock display to show the time in hours, minutes, and seconds. Assume that we have a clock of exactly 1 KHz (1000 clock pulses per second). It will use 6 seven-segment displays and operate either in military time (hours 00 to 23) or regular time (1 to 12, with AM and PM). An input line, x, differentiates between the two. A seventh display is used to show A or P in the latter case; it is blank otherwise....
Write a program that request a time interval in seconds and display it in hours, minutes,...
Write a program that request a time interval in seconds and display it in hours, minutes, second format. (java)
Write a C++ code that can convert time into hours, minutes, seconds. It can accept (seconds),...
Write a C++ code that can convert time into hours, minutes, seconds. It can accept (seconds), (minutes, seconds), (hours, minutes, seconds) The input can be written in main It should produce the following output: (67.4, 14, 5) is 67 Hours, 38 Minutes, 5 Seconds (127.86) is 0 Hours, 2 Minutes, 8 Seconds (-3, 73, 2) is -1 Hours, -46 Minutes, -58 Seconds
1a. Write your Verilog program to implement the timer counter. HEX0 should show tenths of seconds...
1a. Write your Verilog program to implement the timer counter. HEX0 should show tenths of seconds from 0 to 9. HEX1 and HEX2 should show a count of seconds, from 00 to 59. The ones count is on HEX1 and the tens count is on HEX2. 1b. Count backwards and forwards. Add a button or switch to control counting direction. When counting forwards or backwards, your count should not stop but rollover appropriately at the correct time. When counting forward,...
Time Remaining 3 hours 5 minutes 26 seconds 03:05:26 eBook Check my work Check My Work...
Time Remaining 3 hours 5 minutes 26 seconds 03:05:26 eBook Check my work Check My Work button is now disabled Item 3 Item 3 Time Remaining 3 hours 5 minutes 26 seconds 03:05:26 Polaski Company manufactures and sells a single product called a Ret. Operating at capacity, the company can produce and sell 38,000 Rets per year. Costs associated with this level of production and sales are given below: Unit Total Direct materials $ 20 $ 760,000 Direct labor 10...
Time Remaining 2 hours 2 minutes 11 seconds 02:02:11 Item 6 Item 6 Time Remaining 2...
Time Remaining 2 hours 2 minutes 11 seconds 02:02:11 Item 6 Item 6 Time Remaining 2 hours 2 minutes 11 seconds 02:02:11 The Molson Company had budgeted production for the year as follows: Quarter 1 2 3 4 Production in units 11,700 13,700 19,600 15,700 Four pounds of raw materials are required for each unit produced. Raw materials on hand at the start of the year total 5,700 lbs. The raw materials inventory at the end of each quarter should...
Ruben Trout worked the following schedule: Monday, 8 hours, 27 minutes; Tuesday, 7 hours, 38 minutes;...
Ruben Trout worked the following schedule: Monday, 8 hours, 27 minutes; Tuesday, 7 hours, 38 minutes; Wednesday, 9 hours, 19 minutes; Thursday, 8 hours, 3 minutes; Friday, 8 hours, 36 minutes. The employer pays overtime in accordance with FLSA regulations. Required: Determine Ruben's total time worked according to the (a) quarter-hour method and (b) the hundredth-hour method. Which is the more favorable method for Ruben, quarter-hour or hundredth-hour? (Do not round intermediate calculations. Round your final answers to 2 decimal...
A statisitcs instructor participates in triathalons. the table lists the times in minutes and seconds, he...
A statisitcs instructor participates in triathalons. the table lists the times in minutes and seconds, he recorded while riding five laps through each mile of a 3-mile loop. Use a .05 significance level to test the claim that is takes the same time to ride each of the miles. Mile 1 3:15 3:25 3:23 3:22 3:22 Mile 2 3:19 3:23 3:20 3:17 3:19 Mile 3 3:34 3:30 3:29 3:30 3:29 Determine the null and alternate hypotheses. Find the F statistic...
2. Design a digital circuit, using a decoder, only Nor gates, a 7-segment display, and D...
2. Design a digital circuit, using a decoder, only Nor gates, a 7-segment display, and D Flip Flops, that repeatedly outputs the sequences of characters ‘P’, ‘E’, ‘A’, ‘L’ if x=0 and ‘L’, ‘E’, ‘A’, ‘P’ if x=1 .
1.It takes light 8 minutes and 20 seconds to reach the Earth from the Sun. The...
1.It takes light 8 minutes and 20 seconds to reach the Earth from the Sun. The speed of light in a vacuum is a constant at 3×108??. Assume Earth’s orbit is circular.a.Whatis the distance from the Sun to the Earth?b.Calculate the mass of the Sun 2.This past week SpaceX and NASA teamed up to launch two astronauts to theInternational Space Station (ISS)from Cape Canaveral for the first time since 2011.The ISShas a mass of4.08×105??and orbits the Earth on acircular path...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT