Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHi Eraesh,
Personally I will encourage you to try and face it yourself as it is in your interest but I can suggest these guide lines. First forget about HDL coding but focus on how to do your design. You will need a suitable reference clock. run a counter on this clock and generate pulses for seconds/min/hrs then counters for seconds/minutes/hours that overflow as appropriate e.g. "seconds" counter running from 0 to 59 ...etc. design an algorithm for stop watch and a detection algorithm for alarm based n above three counters. once you get your counting ready, you need to display them. One way is to convert them from binary to BCD then decode that for the 7 segment display. Of course you need to consider refresh rate for display and define your inputs, these may include reset,ref clk,user inputs for time-setting or alarm-settings or stop-watch...your outputs will be the decoded values for say 8 display digits such as 00:00:00 as well as the alarm beep... Hope this helps Regards Kaz