Real time the right way?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Have a look at paul borgmeier's clock routines.

    It'll get you alot closer to real time.

    Easy and Accurate Clocks without RTC IC
    http://www.picbasic.co.uk/forum/showthread.php?t=2129
    <br>
    DT

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Thanks, Darrel...great info.

    I've never had an experience with the timer registers so I think I'll rewrite the stopwatch code just as a self tutorial.

    I was just wondering, doing it the way I have based on build counters and instruction cycles there is a chance that the code could get corrupt and miscount as the pic would need a hard reset?

    I suppose if you had a reference like the timer you could "reset" based on that or something.

    I did see a strange count one time and that's all I could think of.

    It'll be fun to study that material.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    No, I don't think so.

    All clock programs have to do the Seconds = Seconds +1 kind of stuff. It just depends on the Time Base that determines the accuracy.

    We'd have to see the code to figure out if there was a Counting problem.

    But in general, if the routine counts properly, it won't get corrupted. Well, except for a stray Cosmic Ray or two, every 10 years.
    <br>
    DT

  4. #4
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Good morning,

    Don't forget Melanie's Olympic Timer program! Measures in 1/100th of a second if I recall. AND it's written in plain English so you can easily follow what is going on in the program.

    BobK

  5. #5


    Did you find this post helpful? Yes | No

    Default

    I'll search that and print it out.

    Actually, my code works fine except for something that looked fishy one time...it's stays in sequence all the way to 59:59 and that's all that matters.

    I spent a whole afternoon trial and error with PAUSEUS to get it right. (Too lazy to do the math to figure it out).

    One thing I need to look at are the led displays...they could be a bit brighter but then there being fed by the constant loop of the 4 mhz Picbasic program. I'm sure if they were scanned at a lower frequency they would brighten up.

Similar Threads

  1. Real Time Clock
    By in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd June 2012, 04:52
  2. Real time clock ICs
    By Eng4444 in forum mel PIC BASIC Pro
    Replies: 66
    Last Post: - 20th October 2008, 16:05
  3. Real time clock... what a headache!
    By Eng4444 in forum mel PIC BASIC
    Replies: 2
    Last Post: - 8th June 2006, 21:56
  4. please read it ( real time)
    By moud_man in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 20th September 2005, 14:38
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts