This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTC counter and Control with printf

Hi Everyone,

I wrote a CODE for RTC on UART1. I am able to get output. But I am looking for enhancement of it.

Output Which I am getting is :

****** HOUR::MIN::SEC********** 12::49::10

****** HOUR::MIN::SEC********** 12::49::11

****** HOUR::MIN::SEC********** 12::49::12

****** HOUR::MIN::SEC********** 12::49::13

I want it to be different

****** HOUR::MIN::SEC********** 12::49::10 is OK

But again if sec=11 then its should overwrite it ****** HOUR::MIN::SEC********** 12::49::11

But again if sec=12 then its should overwrite it ****** HOUR::MIN::SEC********** 12::49::12

This change or counter in second should not go into another line again update it.

It should replace the previous value and this should happen in Min,hour,year,days,months too.

Output should be in single line and should in single line itself on counter increment of values of sec,min,hour etc.

Hour::Min::Sec DOM/MON/YEAR (no Repeated Line, Update should take place at corresponding place)

Please suggest and Dont mind ,if some silly question is made here, as I am BEGINNER

Thanks and Regards

Vinay. Kumar

Parents
  • People who use Google to find this thread will most probably not see the other threads.

    So creating multiple threads means that most people will have to try to help based on a subset of information.

    Next thing - if someone posts something "strange" in a thread: Do you then let them keep the thread and start a new? That is not a well-working solution to a problem.

    Both when programming and when posting to a web forum, a good goal is "locality of reference". Try to keep all information well grouped together so a reader will be able to quickly get up-to-speed on what have been covered and what haven't.

Reply
  • People who use Google to find this thread will most probably not see the other threads.

    So creating multiple threads means that most people will have to try to help based on a subset of information.

    Next thing - if someone posts something "strange" in a thread: Do you then let them keep the thread and start a new? That is not a well-working solution to a problem.

    Both when programming and when posting to a web forum, a good goal is "locality of reference". Try to keep all information well grouped together so a reader will be able to quickly get up-to-speed on what have been covered and what haven't.

Children
No data