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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started