>
> 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
>
syncing up the RTC time
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: syncing up the RTC time
Rather than writing a PC program to format/push date/time out the serial port,
I've used a trivial method in the past. Create a DOS style batch file (bat). In
that, put in an echo command that redirects to a COMn port and sends the date
and time prefixed with some special charcaters, like "TIMEIS:". The
microprocessor side sees this and then parses the date/time string and sets the
RTC.
I've used a trivial method in the past. Create a DOS style batch file (bat). In
that, put in an echo command that redirects to a COMn port and sends the date
and time prefixed with some special charcaters, like "TIMEIS:". The
microprocessor side sees this and then parses the date/time string and sets the
RTC.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: syncing up the RTC time
> Rather than writing a PC program to format/push date/time out the serial port,
I've used a trivial method in the past. Create a DOS style batch file (bat)...
>
> 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.
Both good suggestions, and could function as a BASIC program created by script,
downloaded to ARMmite and run to set the time.
While it could be done through BASICtools, I think the best would be a command
line tool. Let me think about what might be needed, if someone else will work
on a script example, I'll work on the backend dropping it through the ARMbasic
compiler and spitting out to an ARMmite/PRO/web/express
I've used a trivial method in the past. Create a DOS style batch file (bat)...
>
> 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.
Both good suggestions, and could function as a BASIC program created by script,
downloaded to ARMmite and run to set the time.
While it could be done through BASICtools, I think the best would be a command
line tool. Let me think about what might be needed, if someone else will work
on a script example, I'll work on the backend dropping it through the ARMbasic
compiler and spitting out to an ARMmite/PRO/web/express
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: syncing up the RTC time
> ...Create a DOS style batch file (bat)...
Nice suggestion, Steve. Sometimes the most elegant solutions are the simplest
(& most trivial
. Gawd I have forgotten so much about DOS (redirects &
such). As irony predicates, I just stumbled upon my MS-DOS 6.22 reference a few
weeks back - too funny.
Nice suggestion, Steve. Sometimes the most elegant solutions are the simplest
(& most trivial
such). As irony predicates, I just stumbled upon my MS-DOS 6.22 reference a few
weeks back - too funny.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: syncing up the RTC time
> While it could be done through BASICtools, I think the best would be a
command line tool. Let me think about what might be needed, if someone else
will work on a script example, I'll work on the backend dropping it through
the ARMbasic compiler and spitting out to an ARMmite/PRO/web/express
Are you thinking a script that is cross-platform - i.e. so that Mac & Linux
users can use same?
command line tool. Let me think about what might be needed, if someone else
will work on a script example, I'll work on the backend dropping it through
the ARMbasic compiler and spitting out to an ARMmite/PRO/web/express
Are you thinking a script that is cross-platform - i.e. so that Mac & Linux
users can use same?
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: syncing up the RTC time
here's contents of a batch file I've used...
ECHO OFF
echo d-8 %date% %time% >com3:
echo >com3:
ECHO OFF
echo d-8 %date% %time% >com3:
echo >com3: