Calendar-Alarm

Project Report

 

Tang, Sydney

Lim, Su-tarn

Qin, Chen-song

 

 

1998 November 23


Overview

The Calendar Alarm is an enhanced alarm clock. It displays the date as well as the time on a 16×2 LCD, and it can be programmed with up to eight different alarms, each on a particular day of the week. Entering the current time or the time for an alarm is convenient and easy, owing to a keypad interface.

Physical User Interface

The project's 16-button keypad has the layout shown below. Unused keys are left blank.

 

0

1

2

3

4

5

5

7

8

9

E

(E = enter)

 

A 2-row, 16 column LCD is used for presenting information and prompts to the user. A single LED is used to indicate when an alarm is active.

Operation

Start-up

On reset, the LCD becomes blank:

 

 

Setting the time

After the reset button has been released, the user is prompted to enter a new system time. A cursor indicates where the user's input would appear, and text above the cursor specifies what fields should be entered and in what order. Except for the weekday, the fields are in order of descending significance.

 

YyyyMmDdHhMmSsW

_

 

The normal state

After the user has typed in a new time and hit the Enter key, the system enters its normal state. Generally, the time shown will be whatever the user entered earlier, but if the user provided an invalid number for any field, then the number in that field will be defaulted to its smallest allowable value.

 

Although the user initially needs to supply the day of the week, the weekday and the day will automatically be updated henceforth in accordance with the rules of the Gregorian Calendar. (A year that is divisible by 4 is a leap year, unless its last two digits are "00", in which case, it is a leap year if the century is divisible by 4)

 

YyyyMmDdHhMmSsW

199811230859592

 

Selecting an event

If the user hits any key while in the normal state, the system enters the event selection state, from which the user may view and edit any of the 8 programmable alarms. To view/edit one, the user hits a number key from 0 to 7. Hitting any other key will exit to the normal state.

 

Event? (0-7)

 

Viewing and editing an event

Upon choosing an alarm number, the user is shown the time and day of the week on which the chosen alarm is set to go off. A cursor on the first digit allows the user to overwrite the alarm. Note that invalid field entries are allowed here. Entering invalid data effectively deletes or deactivates an alarm.

 

HHMMW

06002

 

 

HHMMW

07002

 

When an alarm is triggered

An alarm may only be triggered while the system is in the normal state. When the current hour, minute and weekday matches one of the programmed events, an LED lights up for 5 seconds or until the user hits a key.