Design and implement a dual-function digital timer using the PIC18F based on the given specification. The digital
Question:
Design and implement a dual-function digital timer using the PIC18F based on the given specification. The digital timer can function as a stopwatch or a countdown timer. In stopwatch mode, it is capable of recording the time up to a hundredths of a second accuracy. In countdown mode, it is capable of counting down from a maximum of 24 hours. You must use MPLAB IDE and Proteus to demonstrate the functionality of your design.
Specifications:
Your design must fulfil the following requirements:
1. Must use PIC18F and assembly language to program.
2. Must use at least three (3) push buttons.
3. Must use at least six (6) seven-segment displays.
4. Must include the use of parallel ports, interrupt, and timer modules. The requirement of interrupt and timer MUST adhere to the following arrangement:
Timer 3, Timer 4, INT1
The operations of the dual-function timer must fulfil the description below.
A. General Operation: Users should be allowed to choose to operate in either the stopwatch mode or the countdown timer mode. This can be achieved by a DIP switch or a push button. When the user switch from one mode to the other, the functionality of the initial mode will cease. For example, when the digital timer is running in stopwatch mode and the user switch to countdown timer mode, the stopwatch will stop running and be reset.
B. Operations as stopwatch: The stopwatch mode should include a display that shows the time in the format of mm:ss.cc, where mm indicates the time in minutes, ss is the time in seconds, and cc is the time in hundredths of a second. When a start button is pressed, the stopwatch starts counting up the time, and the display will show the count of time. Note that the second counter (ss) will be incremented after the hundredth counter (cc) reaches 99. The minute counter (mm), on the other hand, will be incremented after the second counter (cc) reaches 59. When the count reaches 59:59.99, the stopwatch will roll over and continue as 00:00.00, and the counting continues. The stopwatch stops counting when a stop button is pressed. The display will show the last count of the stopwatch. The stop button can be the same start button. When the start button is pressed again, the stopwatch will resume counting from the last count. There should be another reset button which when pressed, the stopwatch will reset its counter and the display back to 00:00.00.
C. Operations as countdown timer: In the countdown timer mode, the display should indicate the time in the format of hh:mm, where hh refers to the hours (max. 24), and mm refers to the minutes. There should be a way for the user to input the time to be counted down for the timer. This can be the same button used in the stopwatch mode. In addition, the same button can be used to cycle through the state of the timer, for example, from setting the hour, then setting the minute, starting the timer and stopping the timer. When in the Set Hours or Set Minutes state, another button can be used to increment the hours and minutes by 1. The countdown timer will stop when it reaches 00:00, and the display will blink every second until a reset button is pressed. When the timer is reset, it will reset back to the initially set hours and minutes.
D. Optional Operations: You can include either one or both optional operations to distinguish the design of your group from other groups. The group with working optional operations has the potential to score maximum marks for this assignment.
i. Optionally, both functions of the digital timer can be set to run in parallel. For example, when the countdown timer has started, it will keep running even when it is in stopwatch mode. Similarly, when the stopwatch is running, user can switch to the countdown timer mode and set the time, start or stop the timer.
ii. In addition, it is possible to include a buzzle or alarm to the digital timer such that when the countdown timer reaches the count of 00.00, the buzzle will sound as the display blinks.
Systems Analysis And Design
ISBN: 978-1119496489
7th Edition
Authors: Alan Dennis, Barbara Wixom, Roberta M. Roth