Digital System Design Project ALARM CLOCK
Project Aim
To design an alarm clock using the system controller approach. The clock uses military time (00:00 23:59).
Project Description
Inputs:
CLK: a 2 Hz clock signal. AON: (alarm on) when asserted, alarm is enabled. SALARM: (set alarm) when asserted, o DHR is AHR (DHR is display hr and AHR is alarm hr) o DMIN is AMIN(DMIN is display minute and AMIN is alarm minute) o HRUP, MINUP will increment AHR, AMIN (respectively) at 2 Hz while SALARM remains asserted. STIME: (set time) when asserted, o DHR is HR o DMIN is MIN o HRUP, MINUP will increment HR, MIN (respectively) at 2 Hz while STIME remains asserted HRUP: when asserted with SALARM, increments AHR. When asserted with STIME,increments HR. No effect if neither SALARM nor STIME is asserted. Increments continue at 2 Hz while HRUP remains asserted. MINUP: when asserted with SALARM, increments AMIN. When asserted with STIME, increments MIN. No effect if neither SALARM nor STIME is asserted. Increments continue at 2 Hz while MINUP remains asserted. Overflow of AMIN or MIN does not cause AHR or HR to increment. SNOOZE: when asserted, causes AMIN to be incremented by one. Increments occur at 2 Hz while SNOOZE remains asserted. Note : SALARM has priority over STIME.
Outputs:
DHR[4:0] displays the hour (a binary number between 0 and 23). DHR[4] is the MSB. Note: can display either the hour of day or the hour that the alarm will sound, depending on SALARM and STIME. DMIN[5:0] displays the minute (a binary number between 0 and 59). DMIN[5] is the MSB. Note: can display either the current minutes-past-the-hour or the minutespast-the-hour that the alarm will sound, depending on SALARM and STIME. AENABLED: (alarm enabled) asserted when AON is asserted. This causes a led to be turned on. ALARM: asserted when AON is asserted, STIME and SALARM are not asserted,and HR= = AHR and MIN = = AMIN. This causes an led to be turned on for 1 minute.
Data units:
HR[4:0]: a 5-bit register holding the current hour of the day (0-23). HR[4] is the MSB. MIN[5:0]: a 6-bit register holding the current minute of the hour (0-59). MIN[5] is the MSB. SEC[5:0]: a 6-bit register holding the current second of the minute (0-59). SEC[5] is the MSB. AHR[4:0]: a 5-bit register holding the alarm hour (0-23). AHR[4] is the MSB. AMIN[5:0]: a 6-bit register holding the alarm minute (0-59). AMIN[5] is the MSB.
Note: When SEC overflows, MIN should be incremented; when MIN overflows, HR should be incremented provided STIME is not asserted. LCD display can be interfaced to display the time on the Xilinx board and a buzzer if available can be used to indicate the working of the alarm.