Question

You want to design a digital watch using the private timer. Write the code with ARM assembly and C. Make your own decision on
0 0
Add a comment Improve this question Transcribed image text
Answer #1

/

/ C implementation of digital clock

#include <stdio.h>

#include <time.h>

  

// driver code

int main()

{

    time_t s, val = 1;

    struct tm* current_time;

  

    // time in seconds

    s = time(NULL);

  

    // to get current time

    current_time = localtime(&s);

  

    // print time in minutes,

    // hours and seconds

    printf("%02d:%02d:%02d",

           current_time->tm_hour,

           current_time->tm_min,

           current_time->tm_sec);

  

    return 0;

}

Add a comment
Know the answer?
Add Answer to:
You want to design a digital watch using the private timer. Write the code with ARM assembly and C. Make your own decision on the language selection (Assembly and C). The followings are the codin...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Design a way of using the pushbutton to trigger an interrupt to your system. Your system,...

    Design a way of using the pushbutton to trigger an interrupt to your system. Your system, upon receiving this interrupt, responds by reading and displaying the temperature in Fahrenheit degrees on the LCD display in the format of xxx.x. The system must resume displaying the digital clock. Build your circuit and include all the required information about your hardware design in your lab report. 4. Based on the hardware you designed, choose an interrupt/timer tool from mbed to update the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT