StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Digital System Clock Design - Case Study Example

Cite this document
Summary
The "Digital System Clock Design" paper is a project depicting a digital calendar clock that displays both the date & Time online. The project implementation has been done by using an M16C microcontroller with the aid of the RSK16C62P development kit…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER94.7% of users find it useful

Extract of sample "Digital System Clock Design"

Submitted by: Table of Contents Contents Page Introduction 3 M16C Microcontroller 4 Code Algorithm 4 Functions 8 Flow Chart 9 Conclusion 11 Introduction This is a project depicting a digital calendar clock that displays both the date & Time online. The project implementation has been done by using a M16C micro controller with the aid of RSK16C62P development kit. An extra striking feature that it comes bundled with is the capability to set the date & time of the online digital calendar clock by using the same development kit and also the project has been developed using the C computer language. M16C Microcontroller. It has been developed by the Mitsubishi Semi-conductor group and consists of a 16-Bit embedded micro controller. It comes in different versions with various amounts of flash memory integrated but they all use an identical instruction set across the range which enables the engineers to maintain the same code base and the available development tools. Among its striking features are the high speeds processing capability it possesses and its ultra low power consumption. Code Algorithm. This is the algorithm that has been used for the design of the system using the RSK16C62 development kit. To begin with, when the loop executes, the Time in State variable has integer value 0 and the state will also be set to 0 also. Now, in the switch case state, after the first time state is 0, the clock is assigned a corresponding ASCII characters which is by the default; Hr, Min, Day variable to be used in the first line of the display and this may be achieved by assigning different characters to each & every bit of the time variable. The second line displays the date in the above format. Immediately when the output has been displayed, there is a prompt that seeks to verify whether the user would like to update his/her date & time and this feature has been aided by the function getcommand() of "keyscan.h". Whenever the user decides to change the hour hand the getcommand () function automatically will return a character “A” and subsequently a message displays:”Set Hour” by automatically calling the LCD_write & Display String function and the state is changed to 1. When the state is set to 1 and the for loop executes it will enter the switch case with the same state 1 and it will display the time on the screen. NB: The output is usually displayed by the assistance of the commands; DisplayString ( ) and LCD_Write ( ). Whenever the power button is activated on the screen, three unique functions may be performed, these include: 1. Whenever A is activated the state will be set to 2 which could also be used to set the minutes of the clock. 2. If B is activated then the time will be displayed. 3. If C is activated, then, the hour increments and the time variable are set. Some of the useful commands that may be used to implement the hour set mechanism may include if(++hr>23) hr=0; time[0]=hr/10+48; time[1]=hr%10+48; When A has been activated and the state has been changed to 2 and the loop iterated it enters switch case with the value 2 in which the message “SET MINS” prompts for the minutes to be set are entered. Some of the actions that may be triggered when the power button is activated are 1. If the “A” button is activated then no action completely. 2. If the “B” button is activated then time will be displayed by setting the state to 0. 3. If the “C” button is activated then the minutes are incremented. Whenever the user decides to change the day or date in the system, the getcommand function used will return the character “B” hence the state variable will be set to 2 and it is this that when the for loop executes for next iteration it is possible to adjust the day of clock. if(++min>59) min=0; time[3]=min/10+48; time[4]=min%10+48; Whenever the button “B” is activated, the day will be displayed and this has been achieved because the state variable has been changed to 0. If “C” is activated the day will be incremented within the system and this principle may be achieved by the following codes: if(++day_number>6) day_number=0; time[6]=day[day_number][0]; time[7]=day[day_number][1]; If “A” is activated the state will be set to 4 for changing the clock’s date. Whenever “A” is activated for modifying the date, the display will prompt: “Change Year” and on activating the “A” and the year is modified then the state value is set to 5 for changing the month. When the state value is set to 5, the message: “Set Month” prompts and it is during this state that activating various buttons will yield different results such as: 1. Whenever “A” is activated the state is set to 6 for changing the date 2. If “B” is activated Date & Time are displayed because the state is set to 0. 3. If “C” is activated then month is incremented and automatically verified if it is greater than 12 and should it be then the state is again set to 1. Whenever “A” is activated a message will prompt on the display to set the date : “Set Date” which the state will be 0, and whenever the buttons at this stage are activated the following events may follow. 1. If button “A” is activated the state is set to 5 which displays & changes the date. 2. If the “B” button is activated then the Date & Time will be displayed since the state is now set to 0. 3. If the “C” button is activated then the date increments and at the same time verifying whether it is a leap year or not. The date may be displayed by using the following codes which also provides the user the freedom to move to the clocks normal display. if(checkleap(year)) { day_in_month[1]=29; } else { day_in_month[1]=28; } if(++date>day_in_month[month-1]) date=1; line2[0]=date/10+48; line2[1]=date%10+48; Functions Some of the functions that have aided in the development of the system includes; Void Keyscan, Boolcheckleap (Int year), Getcommand ( ), Void Interrupt Timer_A0. Void Keyscan ( ): This is a library that includes the sfr62p.h library of RSK16C62P that is mainly used to access development buttons within the development kit. It consists of a structure with unsigned integer data (Data 8-bit, Live 1-bit and Unread 1-bit). Whenever a button has been activated the data from that particular button will be recorded and depending on the particular options prompted by the user after activating the button, data values such as the A(0x1C),B(0x14),C(0x0C) will be assigned to that specific button. Get Command ( ): It is mainly used to return the option that has been opted by the user within the development environment and it reads the data from the button that has been activated. Boolcheckleap (Int year) function: This one is used in the verification & implementation of a leap year which it assumes as an integer. If for instance the year is a leap, then, 1 will be returned by a function and 0 returned otherwise. Void Interrupt Timer_AO: Its main application is to increment the time of the system and while the process of incrementing is on course it will also automatically verify if the seconds are greater than 59, and should the seconds be greater, the function will add a minute to the minute variable and subsequently setting again the second variable to 0. This same principle is also used in the incrementing of minutes and days while adding the day’s boolLeapyear function of checkleap library. FLOW CHART. This is a flow chart depicting the flow of the digital clock systems algorithm. Three input buttons have been considered within the development environment hence three main conditions within each stage. Normal Display State: It is the starting point & the first switch which is mostly represented when the state value has been set to 0. Set Hour State: Whenever the user wants to modify the hour the state variable value will be set to 1, and it is at this state also that the user will be granted the freedom to change both the hours and the minutes and this happens during the normal display stage. Set Minute State: Here the value of the state variable is set to 2 whereas the minutes can be implemented by the user and he/she also possesses the freedom of moving back to the Normal display state that consists of value 0. Set Day State: This is mainly achieved whenever the user chooses an option to set the day which is set at variable 3. Here the user may change the day, move to the normal display or move to the next state to change the day. Set Date State: Here the value of the state variable is changed to 4 and the user has the freedom of changing the dates of the months which may be aided by verifying the number of days of that particular month or even he may proceed on to modify the systems months by changing the variable to 5. Set Month State: Here the state variable has a value of 5 used to modify the months. It checks for days within the month by establishing whether the year is a leap one or not courtesy of the checkleap function and then it modifies the month accordingly. It is also at this point when the user may decide to set the year or may proceed to the normal systems clock display. Set Year State: Here the state variable has 6 as its final value in which the year will have to be modified by the user. Conclusion. We have managed to elaborate on the process used to design & develop a digital calendar clock. This project has been developed using the C programming language in aid of the RSK16C62P software development kit. The system is set to come with an inbuilt feature to be used to set the time & date through its switches SW1, SW2 & SW3. The clocks display is on a 2” x 8” LCD display screen which will show both the time and date. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(Digital System Clock Design Case Study Example | Topics and Well Written Essays - 1500 words, n.d.)
Digital System Clock Design Case Study Example | Topics and Well Written Essays - 1500 words. https://studentshare.org/information-technology/2044243-rewrite-the-assignment
(Digital System Clock Design Case Study Example | Topics and Well Written Essays - 1500 Words)
Digital System Clock Design Case Study Example | Topics and Well Written Essays - 1500 Words. https://studentshare.org/information-technology/2044243-rewrite-the-assignment.
“Digital System Clock Design Case Study Example | Topics and Well Written Essays - 1500 Words”. https://studentshare.org/information-technology/2044243-rewrite-the-assignment.
  • Cited: 0 times

CHECK THESE SAMPLES OF Digital System Clock Design

Creating a Broadcast Vehicle

… Because of limited production schedules and some very expedited editorial needs, the system design includes an Apple X-Serve Raid, disk array supplying real time SDI video in and out of the switcher.... Because of limited production schedules and some very expedited editorial needs, the system design includes an Apple X-Serve Raid, disk array supplying real time SDI video in and out of the switcher.... t the front end of this Apple system, are three Final Cut Pro HD workstations for all the pre and post editorial, networked with Apple X-Serve and Xsan policing file management....
7 Pages (1750 words) Essay

Number Systems

?? It is also referred to as digit, figure, numeral or whole number. The binary system In this system, 0 is called as the Least Significant Bit (LSB) while 1 is called the Most Significant Bit (MSB).... Binary system is the computer language by default because 0 and 1 in computer signify voltage positions of on and off.... Hexadecimal system uses base-sixteen system for computing.... As such, letters from A to F are included in hexadecimal system after counting 0-9 where A stands for 10, B for 11 and so on....
4 Pages (1000 words) Coursework

Design in 21

He was able to make a connection on how fonts were able to influence the contents of a design and their audience.... These values are all manifested into the product philosophy of Apples, through its production of a seamless, sleek, simple and integrated design.... The first product made by Apple that was able to change the field of design is the invention and the design of the Macintosh computer system which had a Graphic User Interface (GUI)....
4 Pages (1000 words) Research Paper

Optical Communications in Light Signals

The information or signal that is passed through optical communications can take place in With this the signal is converted into a form which is compatible with the system.... The baseband video signal in the system is quantified and sampled.... The best forms of sensitivities are offered by these PPM without causing the large bandwidth of the system to increase.... For analog form, A/D converter is used for the transmission of the signal, and for digital form, such a block is not required if data already exists in the digital form (Bagad and Dhotre, 2009, p....
4 Pages (1000 words) Essay

Hardware Systems & Design

The main objective is to implement an input and output mechanism of the SRF05 range finder to create a device for measuring distances.... The… The maximum value displayed by the DE0 board is 9 centimetres.... At the same time, there are some rare bitwise operations needed using the operators in C language for the IO ports....
8 Pages (2000 words) Assignment

Designing an Outside Broadcasting Vehicle

The writer of this report "Designing an Outside Broadcast Vehicle" gives the design outline of Channel M's project.... At the front end of this Apple system, are three Final Cut Pro HD workstations for all the pre and post editorial, networked with Apple X-Serve and Xsan policing file management.... nbsp; Because this truck is also equipped with a talent voiceover booth and often takes external camera feeds, a Clear-Com MS-232, 2-channel communications system is installed as a master user station with several Clear-Com RM220 fixed user stations and Clear-Com RS-602 belt pack stations....
7 Pages (1750 words) Report

Amplification, Rectification and Applications in Motor Design

The paper "Amplification, Rectification and Applications in Motor design " describes that SR's are components that help to convert ACS to DCS and while making use of the diodes.... he circuit design of the motor is discussed with regard to its two components thus, systems analogue circuit and systems digital circuit.... hellip; SC is used in the system, which is different from the asynchronous counter given that it consists of flip-flops that are supplied by the clock pulses....
5 Pages (1250 words) Essay

ATmega328 Microcontroller and the Functions of Its Components

Its sophisticated RISK structural design allows for 131 powerful commands with the execution of the clock cycle that is the most independent.... Its sophisticated RISK structural design allows for 131 powerful commands with the execution of the clock cycle that is the most independent.... The flash program memory programs itself within the system and possesses 4/8/16/32K Bytes.... Figure 1: Block figure of the system... The analog to digital converter (ADC) is an 8 channel 8 bit when TQFP and QFN/MLF are put together....
6 Pages (1500 words) Case Study
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us