Program that implements a digital clock, C/C++ Programming

Assignment Help:

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 that implements a digital clock

Explalin concept of derivations in c++, derivations 1. Regardless of the...

derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,

#calculate percentge, #write a multilevel c++ program to take marks of 3 su...

#write a multilevel c++ program to take marks of 3 subjects and calculate percentage and display it

Beti, how is a beti a beti

how is a beti a beti

How to make a triangle number, i wont to make triangle with number but numb...

i wont to make triangle with number but number from the largest possible number to 01 (reversed).

Create a program to word count, Create a program WordCount1Main.java doing ...

Create a program WordCount1Main.java doing the following:  For each word in the le word.txt { Create an object of the class Word { Add the object to a set of the type java.uti

Switch...case, Write a function to accept a character and display it 40 tim...

Write a function to accept a character and display it 40 times.

PEBBLE MERCHANT, There is a pebble merchant. He sells the pebbles, that are...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

What is the best fit algorithm, The Best fit algorithm: The best fit metho...

The Best fit algorithm: The best fit method occurs the smallest free block whose size is greater than or equivalent to n. An algorithm to get such a block by traversing the whole

Assesors, what are assessor. elaborate with clear easy diagrams

what are assessor. elaborate with clear easy diagrams

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