Real Time from PC to DS1302
Greetings. Now that I have the DS1302 talking and timing properly with the BS2pe, I need to establish syncronized time with a PC. Has anyone an idea of how to make a system call to a PC from the BS2pe and insert that result into Jon Williams ds1302.bs2 code for a time reference, and then run his code?
Comments
DEBUG "!READ (HH)",CR ' returns current value of 24-hour time for hours
DEBUGIN DEC hour
DEBUG "!READ (MM)",CR ' .... minutes
DEBUGIN DEC Min
DEBUG "!READ (SS)",CR ' ... seconds
DEBUGIN DEC Sec
Of course, be careful of seconds rolling over and changing minutes. You can request and parse a more complex string
DEBUG "!READ (HH),(MM),(SS)",CR
Rest is up to you [noparse]:)[/noparse]
http://www.stampplot.com
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
Thank you, Mike. I think this is the most promising idea. i'll give it a try and let you know what happens.
By the way, do you have a link to Jon's article?
No. It doesn't take too long to go back through the back-issue list for the titles of the articles. Often I'll spot something to come back and look at later.
Mike
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
Good point, but my application has an on-PC component to which I can add the system call and serial access.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices