Professional Documents
Culture Documents
ZHU Siyue
DSE
Specification
Requirement
Use the FPGA board in lab
Use at least one peripheral (not LCD panel)
Make use of interrupts
8 Functions Finished
Clock : year, month, date, hour, minute, second and can distinguish different
months or leap year
12/24 hour mode: when in 12 hour mode show AM/PM on the LCD screen
Setting: in this mode, user can change the number of each bit of clock
Timer: set time, start to countdown, reset, LEDs shine when time up
Alarm: set alarm and snooze function, bell ring when time up
snooze – pre-set: allow at most 5 minutes sleep time, then ring 30 sec in every
5 min
– interrupt set: interrupt the bell ( if in 2 minutes) , then ring 30 sec in
every 5 min
Stopwatch: start, pause, reset
Low power: in function1(clock), if press low_power then all button locked and LCD
cleared, which means only clock and alarm(if there is) run in the background
Clear LCD
Construction
Center button
(function switch)
Left button
(reset in functions)
Right button
(start/pause )
North button
(increase/plus)
South button
(decrease/minus)
low
Function Implementation
Switch(function)
Alarm and Snooze On {
case 0:……,break; //default setting
case 1:……,break;
…………………..
Sleep Mode
}
}
Void main
{
while(1){
………
switch(function)
{
case 1:……;break; //implemtation
case 2:……;break;
……………..
}
}
}
Function implementation .cont
Function Switch
Specific
Function
Overview of Function Control
Function implementation .cont
Stop/Pause
All data
Left reset -------- Left bit Right bit Left bit reset