Question

In: Electrical Engineering

1. Design a blinking LED with two speeds - slow and fast. Specification To change from...

1. Design a blinking LED with two speeds - slow and fast.

Specification

To change from slow to fast press Button 1 and fast to slow press Button 2.

Reset puts the machine to slow blinking.

entity blink is port (b1, b2, ck, reset: in std_logic;

z: out std_logic);

end blink;

Solutions

Expert Solution

library IEEE;  
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity blink is

    port (b1, b2, ck, reset: in std_logic;

z: out std_logic);

end blink;

architecture behavioural of blink is

signal counter : std_logic_vector(3 downto 0);

begin

     process (clk)

     begin

        if (clk'even and clk = '1') then

         if (rst = '1') then

            counter <= "0000";

         else

         if(b1 = '1') then

          if (counter = "0111") then

                 counter <= "0000";

              end if;

            elsif (b2 = '1') then

               if (counter = "1111") then

                  counter <= "0000";

                end if;

            end if;

   counter <= counter + 1;

      end if;

   end if;

   end process;

   process (b1, b2, rst, counter)

   begin

     if (rst = '1') then

        blink <= '0';

    else

        if(b1 = '1') then

            if (counter = "0111") then

                blink <= not blink;

            end if;

       else   -- with reset or with b2

            if (counter = "1111") then

                blink <= not blink;

            end if;

       end if;

     end if;

end process;

end behavioural;


Related Solutions

1. Why would it be beneficial to slow down the rate of a very fast reaction?...
1. Why would it be beneficial to slow down the rate of a very fast reaction? Give at least one example of a fast reaction that is slowed down. Provide at least one citation for this question. ? 2. What does order mean when discussing kinetics? Discuss the difference between zero, first, and second order reactions and how order can be determined for a reaction. Provide at least one citation for this question. ? 3. If the rate constant is...
Describe two causes of BOTH the fast and the slow phase of EPOC (excess post-exercise oxygen...
Describe two causes of BOTH the fast and the slow phase of EPOC (excess post-exercise oxygen consumption).
Below are data for countries with fast and slow growth rates over two different time periods....
Below are data for countries with fast and slow growth rates over two different time periods. Construct a bar chart for each country in both categories. In other words, you will end up with four different bar charts, two for each of the two categories of the countries representing both time periods. Country Average Growth Rate of Real GDP 1990–2000 Average Growth Rate of Real GDP 2000–2008 Fast Growth Club (5% or more per year in both time periods) Cambodia...
You're on a highly-classified project to design rockets of incredible speeds. There are two situations, one...
You're on a highly-classified project to design rockets of incredible speeds. There are two situations, one is a two-stage rocket and one is a three-stage rocket. The two-stage rocket reaches a speed of .5c in relation to the launch-pad in deep space. In relation to the first stage, the second stage reaches a speed of .5c. Each stage in the three-stage rocket reaches a speed of (1/3)c in relation to the launch-pad or in relation to the stage it separated...
is it a phosphate system, slow glycolysis, fast glycolysis, beta oxidation, or transamination/deamination? 1. protein will...
is it a phosphate system, slow glycolysis, fast glycolysis, beta oxidation, or transamination/deamination? 1. protein will be used as fuel is depleted of fuel 2. can be enhancing by eating more red meat. 3. recovered in 60 min. 4. 1 atp per one substrate used 5. results in co2 and h20 6. complete depletion of carbs 7. predominant system for long distance endurance between 60 to 70% 8. clear lactate fast than it is produced 9.predominant system for long distance...
from QFD, what factor use to determine most important design specification? Is it the absolute weight...
from QFD, what factor use to determine most important design specification? Is it the absolute weight or relative weight? How can I list the order of importance of the design specification using data from QFD?
1.Name the enzyme(s) that is defected in methionine metabolism 2 .Define” fast” and “Slow” protein 3....
1.Name the enzyme(s) that is defected in methionine metabolism 2 .Define” fast” and “Slow” protein 3. What is the difference in absorption and metabolism of Fast and Slow protein? 4.Explain what happen to protein during the postabsorptive phase, discuss the hormones involved and their role and relations in protein synthesis 5. Mary is a 25 years old postoperative patient at the health clinic on campus. With an 80gm protein intake, and a 10-gram urea nitrogen output. Please calculate Mary’s nitrogen...
In Thinking, Fast and Slow, you learn about several biases including the (1) availability bias, (2)...
In Thinking, Fast and Slow, you learn about several biases including the (1) availability bias, (2) anchoring effect, (3) hindsight bias, and (4) focusing illusion. a. For each of these biases, discuss (one at a time) how each could affect your decision making as a manager or employee (choose the role - manager or employee - you feel is more appropriate for the discussion). b. How can being aware of these biases help you in your role as a manager...
DUE IN TWO HOURS ASAP PLEASE!!! Given the following specification, design a class diagram using PlantUML....
DUE IN TWO HOURS ASAP PLEASE!!! Given the following specification, design a class diagram using PlantUML. To design the class diagram, use abstract (10 points), static (10 points), package (20 points ), namespace (20 points ), association (20 points ), and generalization (20 points ) on PlantUML Specification: A school has a principal, many students, and many teachers. Each of these persons has a name, birthdate, and may borrow and return books. The book class must contain a title, abstract,...
please solve it and thank you converting 220v Ac to 12V DC : 1. Design specification...
please solve it and thank you converting 220v Ac to 12V DC : 1. Design specification 2. Specification of each of the component used in the project 3. Transformers, Step-down transformer, transformer ac input/ ac output specifications 4. Rectifier (forward and reverse biasing diode, half wave rectifier, full wave recifier) 5. Peak Inverse Voltage, Calculation of Peak inverse voltage 6. Filter capacitor 7. Unregulated Power Supply 8. Voltage regulation using an IC 7812 9. Percent regulation with Zener diode and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT