Program to create a digital clock, C/C++ Programming

Assignment Help:

Create a C language code, only one program, to implement the following task.

Task:

Write C code for a program that implements a digital clock (HH:MM:SS).

The clock includes a two-digit hour indicator HH (00-23), a two-digit minute indicator MM (00-59), and a two-digit second indictor SS (00-59).

The main interface is through the serial port to the terminal program.

At start or upon reset, the program displays "00:00:00".

The program should use one or multiple timers of the microcontroller to create a timebase of 1 sec that acts as the clock's heartbeat.

In passing of each 1 second, the following tasks should be performed:

(i) SS+1; SS=60?àSS=00, MM+1; MM=60?àMM=00, HH+1; HH=24?àHH=00.

(ii) Display the new HH:MM:SS on the terminal program.

Whenever a pushbutton is pressed, the clock should be reset restarting from "00:00:00".

An interrupt routine should be used to detect the pressing of the pushbutton. Thus, select one of the eight pushbuttons that is able to interrupt the microcontroller.

The following can be used as guide to write the code. (do not write code for separately  the following.  The code should compile in ATMEL Studio 6 and able to display in a Terminal Program Interface.

1. Write the code to display time on the terminal program.

2. Write the code to use one or multiple timers of the microcontroller to create a timebase of 1 sec that acts as the clock's heartbeat.

3. Write the code to calculate and keep track of time.

4. Write the code to detect the pressing of the pushbutton using an interrupt based approach, and reset the clock.

5. Write the code to implement additional functionalities to the C program (considered for Problem 3 only).

6. It would be helpful to understand your coding if you draw a flowchart and develop the corresponding pseudo.

7. Processor, 8 bit,  ATMEGA 128, 16MHz.


Related Discussions:- Program to create a digital clock

Class and object, write a class player that contain attributes for the play...

write a class player that contain attributes for the player,s name,average and team

Program that controls the lcd display, Objective:  Construct a C program...

Objective:  Construct a C program that controls the LCD display, and is capable of displaying strings.  Add functions to the C program that allows more control over the display.

Accessibility, What are the legal requirements with which websites must com...

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

The square roots of the integers from 1 to 100, Assume we wish to partition...

Assume we wish to partition the square roots of the integers from 1 to 100 in to two piles of fifty numbers every, such that the sum of the numbers in the first pile is as close as

Define advantages of multi file program, Define Advantages of Multi File Pr...

Define Advantages of Multi File Program? The main merits of spreading a program across several files are: • Teams of programmers able to work on programs. Every programmer w

Super ascii, program to convert string from super ascii string with minimum...

program to convert string from super ascii string with minimum cost

Padovan string, padovan string program in java // aakash , suraj , p...

padovan string program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class PadovanString {     publ

C program that controls the uart, Objective: Construct a C program tha...

Objective: Construct a C program that controls the UART, and is capable of displaying strings. Echo characters received on the UART to the LCD screen Outcome: A mess

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd