Question: Write a C language program that implements a 12 hour real time clock using the LCD display unit on the MSP430FG4618 experimenter board. The clock

Write a C language program that implements a 12 hour real time clock using the LCD display unit on the MSP430FG4618 experimenter board. The clock should include hours, minutes, and seconds:

12: 55:55

Every second, the LCD display should be updated with the new time. The LCD display should be called from the timer interrupt service function to update the various seven segment displays based upon a set of time variables. The following gives the pseudo code to increment the various time variables. For example, whenever the second tenths variable reaches 6, this variable is reset to zero and the minute units variable is incremented by 1.

su = second units

st = second tenths

mu = minute units

mt = minute tenths

h = hours

hu = hour units

ht = hour tenths

su++;

if(su == 10)

{su = 0; st ++;}

if(st == 6)

{st = 0; mu++}

if(mu == 10)

{mu = 0; mt++}

if(mt == 6)

{mt = 0; h++}

if(h == 13)

{h = 1;}

hu = h;

ht = 0;

if(h == 10);

{hu = 0; ht =1);

if(h == 11);

{hu = 1; ht =1)

; if(h == 12);

{hu = 2; ht =1);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!