The World Clock Design and Implementation



The World Clock Design and Implementation Jhavik Gaudemar Bfern KIGNOUMBA (金永)Advisor: Prof. Chia-Chun Tsai Department of Computer Science Information and Engineeringbferndejhavik@AbstractIn this project, we design and implement a world clock. The clock is a device controlled by the user and the user will be able to find the time on different locations with the respective time zone. Just by choosing the location in need, the user can get the real time if the default time as been set correctly. By using a 8951 microcontroller, we have been able to create the device that can help on people at home, or even everywhere, because the device here do not need any internet connection to function correctly. The objectives of our project here includes: 1) time setting and 2) location’s choice. Our world clock can set up to locality's times of 16 countries. Keywords: World clock, Time zone, Microcontroller, Location’s choice, Display. I. IntroductionLiving aboard and far away from your country is not easy thing cause other time you would like to pass calls but there is a big with a time zone, so it is sometimes a hassle because you don't know if it is already a night time or not; and you would have to do some operations to know what time is it wherever you want to call, but when you have an international clock, with what you will just need to press on one button and you have the time you want to know, it will be much comfortable and easier. That is the reason I wanted to make an international clock for myself at home that would show the time of many countries. I have a preference for LED displays as they are bright and give a large display.The requirements are:Use 7-segment LED displays to make an open displayer.Display the time.4x4 buttons to set time and also for the choice of the locality. 2 single buttons, one to choose the set time function and the other one to change the time zone.8-bit microcontroller 8951.Here is the system diagram as shown in Fig 1 presenting the entire project.Fig. 1: The system diagram of a world clock.II. Design and DevelopmentThis project creates a clock which displays the time for different countries on a displayer made of six 7-segment displays and 4 red-light LEDs. Here, we are presenting a settable time that will be set as default time. And can be change according to the time zone in need. To set of time and the choice of the locality's time, we have provided two push buttons to allow the user to choose which function he needs to set. As our clock here doesn't use the real time chip device, so we need to set first the time before any use. If the first button is pressed , the user can now set the time from hours to seconds using the 4x4 keyboard, the time counter restarts once the user is done with his six entries, if not yet done, the clock won't be activated. While the second button is pressed, a LED light on the CPU is on, and that is to let the user choose the location's time that he would like to know, using the same 4x4 keyboard as the adjust time. Here in Table 1, showing some of the world’s different times took from the link [1], with Taipei as a default time; we can see that there is a big difference of time according to the locality.Before creating the program we have listed the steps that the program requires: Initialize the PIC and set all digits to zero. Start the timer interrupts to count the seconds elapsed. When seconds reach 60 increment minutes and reset seconds. When minutes reach 60 increment hours and reset minutes. When hours reach 24, they are reset.When the first push button is pressed, stop updating the clock, can now enter digits from 0-9. The two pressed buttons on the keyboard are to set the hours, the two others for the minutes, then for the seconds. After the all settings, the second increments the number on the digits. When the digit reaches its intended maximum it returns back to its lowest value. For example, hours range from 00 to 23. When the digit increments to 24 it returns to 00. When the second push button is pressed, it now allows you to choose the locality's time. When a button on the keyboard is pressed, it change the time zone, it increase or decrease to hour; depending on which button have you pressed.Table 1. Locality's times are for different time zones.Time zone Locality'sTime Taipei22:42 Washington DC 09:42 Anchorage 05:42 Pretoria 16:42 Dubai 18:42 Tokyo 23:42 Sydney 01:42 (on the next day) Kinshasa 15:42 Darwin 00:22 (on the next day) II.A The keyboardA basic 16-button keypad for user input. These buttons are setup in a matrix format. This allows a microcontroller to scan all the output pins to see which of the 16 buttons is being pressed. Here Fig. 2 is the model of the keyboard controlling the time zone change and the settings; Fig. 2: The keyboard's sample.II.B The flowchartsBased on these steps we created a flowchart diagrams as shown in Figs. 3, 4, 5, and 6 to help us to create the program.Fig. 3: The system's flowchart.Fig 4: Key flowchart.Fig 5: Set time flowchart.Fig 6: Displayer flowchart.As known that the time is displayed on a displayer made by seven segment display, so we have two different circuit diagrams. The first circuit diagram displayed in Fig. 3 is for the displayer and the 2nd in Fig. 4 is for our world clock.III. ImplementationIII.A DisplayerHere is the image showing the displayer circuit as shown in Fig. 7. Eight outputs are used to turn the 7-segment on and off and one more output to turn on and off the flashing four LED light disposed between hour-minute and minute-second; and that is controlled with a given clock of 1 Hz. The 7-segment displays here are common anode so a port set low turns the segment on and a port set high turns it off. Each of the digits is turned on sequentially. The segments for that digit are only on while that digit is on. The seven segment display is connected with the 7447 IC for its functioning. The total number of the seven segment display is 6, where two to display hours, two minutes and the last two for seconds. And also, this displayer is not only for displaying the time, but can also display all what can be displayed on the 7-segment, according the controlling CPU. To build this, we referred to the link [2] shown bellow. Fig 7: The displayer's circuit.III.B The World ClockA world clock here doesn't mean the entire globe's countries time, but some of them. Here we can count 16 different times, marked by the different time zone difference, (eg: when it's 22:27 in Taiwan, it is 16:27 in Cape Town). The designing of the timer is done with the P89V51RD2 chip, programmed with the assembly language. Combine with a 4x4 keyboard plus two additional single-pushed buttons as explained previously, also with a LED indicator light. To build this, we had to refer to some websites to see how to connect to control the microcontroller 8951; and here are some links [3,4,5] shown bellow. Note: here our timer only show the time not the date, so even if by pressing the time zone it gives the time which seems to be in a different day, we should know that our timer cannot precise the day.Here is the image showing our microcontrol circuit in Fig 8. Showing all the connections to the 8951 chip, such as the keypad to the chip and so on, Fig 8: The timer's circuit.IV. Results and ConclusionAs said in previous words, our project here is to provide the time zones on different localities. Here we have images took from our world clock, showing Taipei's zone time as a default time on Fig 9. And Sydney's zone time on Fig 10; the two localities has a time difference of 3 hours as shown on pictures below.Fig 9: The time in Taipei.Fig 10: The time in Sydney.References[1] Example on the real time Zone [2]The seven segment display building. [3] On keyboard -[4] Code programming-[5] code ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download