syncing up the RTC time
Posted: Fri Jan 18, 2013 5:03 pm
>
> I'd like to be able to synchronize the RTC on the PRO to the clock on my PC.
Obviously I can write the ARMbasic part of the code easily enough, but can't
figure had to get the info from the PC, running Windows XP.
>
> Could such a 'feature' be incorporated into BASICtools?
Is your app intended to be running on an ARMmite PRO connected any arbitrary PC,
or will you have control of the environment on the host PCs? If so, is it your
intention to have BT running when the ARMmite PRO is connected to the host?
I ask as, if the app will be on boxes that you have direct control over, it
might be a fairly easy task to modify BasicTools.tcl and have the IDE be able to
'reply' to a query from the Target PRO with the PC's Date/Time.
If not, then I'd approach it by writing a script that gets compiled and ran on
the Host PC prior to the ARMmite PRO getting connected. That way, the compiled
script running on the host can reply to a query from the target ARMmite PRO.
If your budget allows, you might want to consider looking at an ARMmite proper
as it has facilities for connecting a Battery Holder and making use of the RTC
peripheral on the 2103. I believe that the RTC's crystal is populated on the
ARMmite too. I just looked at the schematic for the ARMmite PRO and it looks
like there isn't facilities for connecting a battery, like there is with the
ARMmite.?. Regardless - there'd have to be a mechanism for setting the
date/time on the target board anyways...
Have you thought about just querying the user at start-up for the current date
and time? In the end, it might be less code than the support routines needed
for the polling the host and setting the date/time in the MCU.?.
>
> I'd also like any 'tricks' on minimizing size of code and data. I'm already
packing 6, 8 and 2x9 bit data fields into a word! My application is a tight fit
on the PRO, and our cost budget rules out the ARMexpress offerings.
If you're code is not 'sensitive' - i.e. others can see it without risk of
compromising any IP concerns that you might have, I respectfully suggest that
you .zip all of the source files up and posting them to the files section and
seeing if you get any bites on suggestions for optimization. I am an ARMbasic
guy, not a C guy, so if you app is written in C, then I'd have to defer to
others.
If you are using ARMbasic, and making use of the BASIC libs provided by
Coridium, then the first place I'd look is to see how many stock library files
you are #including and start by copying same, hacking out what isn't used, and
#include'g your own optimized lib files.
Good luck.
-t
>
> Chris
>
> I'd like to be able to synchronize the RTC on the PRO to the clock on my PC.
Obviously I can write the ARMbasic part of the code easily enough, but can't
figure had to get the info from the PC, running Windows XP.
>
> Could such a 'feature' be incorporated into BASICtools?
Is your app intended to be running on an ARMmite PRO connected any arbitrary PC,
or will you have control of the environment on the host PCs? If so, is it your
intention to have BT running when the ARMmite PRO is connected to the host?
I ask as, if the app will be on boxes that you have direct control over, it
might be a fairly easy task to modify BasicTools.tcl and have the IDE be able to
'reply' to a query from the Target PRO with the PC's Date/Time.
If not, then I'd approach it by writing a script that gets compiled and ran on
the Host PC prior to the ARMmite PRO getting connected. That way, the compiled
script running on the host can reply to a query from the target ARMmite PRO.
If your budget allows, you might want to consider looking at an ARMmite proper
as it has facilities for connecting a Battery Holder and making use of the RTC
peripheral on the 2103. I believe that the RTC's crystal is populated on the
ARMmite too. I just looked at the schematic for the ARMmite PRO and it looks
like there isn't facilities for connecting a battery, like there is with the
ARMmite.?. Regardless - there'd have to be a mechanism for setting the
date/time on the target board anyways...
Have you thought about just querying the user at start-up for the current date
and time? In the end, it might be less code than the support routines needed
for the polling the host and setting the date/time in the MCU.?.
>
> I'd also like any 'tricks' on minimizing size of code and data. I'm already
packing 6, 8 and 2x9 bit data fields into a word! My application is a tight fit
on the PRO, and our cost budget rules out the ARMexpress offerings.
If you're code is not 'sensitive' - i.e. others can see it without risk of
compromising any IP concerns that you might have, I respectfully suggest that
you .zip all of the source files up and posting them to the files section and
seeing if you get any bites on suggestions for optimization. I am an ARMbasic
guy, not a C guy, so if you app is written in C, then I'd have to defer to
others.
If you are using ARMbasic, and making use of the BASIC libs provided by
Coridium, then the first place I'd look is to see how many stock library files
you are #including and start by copying same, hacking out what isn't used, and
#include'g your own optimized lib files.
Good luck.
-t
>
> Chris
>