RTC Battery Back-Up
RTC Battery Back-Up
Hi Leigh,
Just a quick question with regards to the RTC Battery Back-up.
I have inserted a 2032 Lithium battery in the Miac and I assume we can't keep calling a RTC Set-up Macro as it will keep defaulting the RTC Clock to the time we have set in the Macro. How can we call the RTC set-up once and not again so we don't overwrite the time each time the MIAC Switches off?
Regards,
Gavin
Just a quick question with regards to the RTC Battery Back-up.
I have inserted a 2032 Lithium battery in the Miac and I assume we can't keep calling a RTC Set-up Macro as it will keep defaulting the RTC Clock to the time we have set in the Macro. How can we call the RTC set-up once and not again so we don't overwrite the time each time the MIAC Switches off?
Regards,
Gavin
Re: RTC Battery Back-Up
Thanks Leigh!,
I have written the Time part of the RTC keypad working nicely, just the date side and I will run some tests..
Regards,
Gavin
I have written the Time part of the RTC keypad working nicely, just the date side and I will run some tests..

Regards,
Gavin
Re: RTC Battery Back-Up
Thanks Leigh!,
Working nicely now - thanks again for the help!
Regards,
Gavin
Working nicely now - thanks again for the help!
Regards,
Gavin
Re: RTC Battery Back-Up
Hi Leigh,
I have the time working nicely, the date is an issue, I can't seem to get the last digit for the Year on my routine, somehow I have tried it a Million ways and still nothing. Any help would be greatly appreciated.
The routine is not very polished just playing about but somehow If I enter 10/01/19 in the key pad I can only get 10/01/1
Many Thanks...
Regards,
Gavin
I have the time working nicely, the date is an issue, I can't seem to get the last digit for the Year on my routine, somehow I have tried it a Million ways and still nothing. Any help would be greatly appreciated.
The routine is not very polished just playing about but somehow If I enter 10/01/19 in the key pad I can only get 10/01/1
Many Thanks...

Regards,
Gavin
- Attachments
-
- RTC_2.fcfx
- (100.95 KiB) Downloaded 359 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: RTC Battery Back-Up
Hi Gavin,
You are getting on well
The simulation debugger is very useful for helping with these kind of problems.
If you set a breakpoint in your GET_DATE, run the simulation, when it stops on the breakpoint add DATE to the variable watch.
You can then edit the value of DATE to help see what is happening ...
Then Step to the next icon and see how the DATE changes ...
So this is the fix ...
Hope that helps
Leigh
You are getting on well

The simulation debugger is very useful for helping with these kind of problems.
If you set a breakpoint in your GET_DATE, run the simulation, when it stops on the breakpoint add DATE to the variable watch.
You can then edit the value of DATE to help see what is happening ...
Then Step to the next icon and see how the DATE changes ...
So this is the fix ...
Hope that helps
Leigh
Re: RTC Battery Back-Up
Thanks Leigh,
The Simulation really, really helps!,
I still can't seem to see the 2?
I used the calculation in Date Set as:
DATE[5] = '5'
DATE[4] = '4'
DATE[3] = '3'
DATE[2] = '2'
DATE[1] = '1'
DATE[0] = '0'
I used the Calculation as
DATE[8] = 0
DATE[7] = DATE[5]
DATE[6] = DATE[4]
DATE[5] = '/'
DATE[4] = DATE[3]
DATE[3] = DATE[2]
DATE[2] = '/'
DATE[1] = DATE[1]
DATE[0] = DATE[0]
And attached is what I get
The Simulation really, really helps!,
I still can't seem to see the 2?
I used the calculation in Date Set as:
DATE[5] = '5'
DATE[4] = '4'
DATE[3] = '3'
DATE[2] = '2'
DATE[1] = '1'
DATE[0] = '0'
I used the Calculation as
DATE[8] = 0
DATE[7] = DATE[5]
DATE[6] = DATE[4]
DATE[5] = '/'
DATE[4] = DATE[3]
DATE[3] = DATE[2]
DATE[2] = '/'
DATE[1] = DATE[1]
DATE[0] = DATE[0]
And attached is what I get
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: RTC Battery Back-Up
Could you try it on the hardware now?
It could be that the RTC component does not simulate.
If hardware does not work, could you post your latest project file?
It could be that the RTC component does not simulate.
If hardware does not work, could you post your latest project file?
Re: RTC Battery Back-Up
Oops how embarrassing as I should've seen that...
thanks Leigh - all working!
thanks Leigh - all working!