Before I get started, I just want to say this is just the design aspect. So far, no code has been written for this aspect of my project.
I just designed a lap function for a stopwatch, which functions essentially as a ROM. To do this i want to make sure that once I press a push button (up to 4 times) a lap will be stored. Furthermore, I plan to execute this by using a 2 bit counter, where the push button will be count up to 4 cycles in 2 bits. From here I want the 2 bit number to be used as input to a 2-4 decoder. The 4 outputs will be used as the enables to 4 different registers. These registers are the 4 laps used. Inputs of registers is the current count of the stopwatch These are all connected to a 4-1 MUX. I want to use a lap select (2 bits) as select lines to a MUX to push through the targeted lap time. This will eventually be displayed on the 7 segment display. (No issues with this display aspect I designed)
Currently, I am worried about how to denounce the push button since the clock is at around 200MHZ for my board. How should I do this? Sould I build something resembling a shift register with the push button as the input, and pass all the delays/signals through an and gate? I'm also worried about repeated cycling due to the length the button is pressed. Should I also couple this with a clock divider so I can slow down the clock to the register of the counter? I heard something about clock dividers being innacurate with a high degree of uncertainty when using high-speed clocks as an input, while in conversation with my professor.
This is what I have designed for the counter
Any help is appreciated, thank you.
Aucun commentaire:
Enregistrer un commentaire