Shop OBEX P1 Docs P2 Docs Learn Events
How to get a clock reading? Use Windows Clock? — Parallax Forums

How to get a clock reading? Use Windows Clock?

IceFireProIceFirePro Posts: 86
edited 2010-06-08 16:15 in BASIC Stamp
Hi everyone,

I am just starting off with my new BS2 and I have this question:

As I see, the BS2 does not have it's own quartz clock. Is there a way to get data from the system timer/windows clock within a BS2 program, or is the only way through an additional chip like the DS 1302 / DS 1307?

Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-06-08 15:27
    The only way to get a clock reading is to attach an external real-time-clock like the DS1302 or DS1307. You can approximate a clock by using the PAUSE statement though. The PAUSE timing is quite accurate, but the Stamp can't do anything else while it's paused and you have to adjust for the execution time of whatever other statements get executed in between PAUSEs.
  • IceFireProIceFirePro Posts: 86
    edited 2010-06-08 16:09
    Thank you. I have already ordered a sample of the DS1307 32Khz DIP package chip.

    But I am also thinking that it should be possible to get clock reading through VB 6 - stamp sends pings to Terminal and VB 6 replies.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-06-08 16:15
    It's certainly possible for the Stamp to send requests for the time to a VB (or other) program and get back time information
Sign In or Register to comment.