please read it ( real time)


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Bob_W's Avatar
    Bob_W Guest


    Did you find this post helpful? Yes | No

    Default

    98% accuracy won't cut it for any clock project I'm aware of. That would mean an inaccuracy of around 2 seconds a minute. Take a look at this code http://www.picbasic.co.uk/forum/showthread.php?t=190 This allows you to time down to 1/100th of a second with whatever accuracy your timebase (crystal) is. This is a hardware solution using hardware counters / timers that are included with many PICs. Much easier, and more accurate than counting instructions.

  2. #2
    moud_man's Avatar
    moud_man Guest


    Did you find this post helpful? Yes | No

    Default

    hi
    1st thnx for repl.

    >>>i already have seen that link before i post the thread and....

    i embeded it in my project code of the real time clock but it wasnot a second

    the display that appear in the 2 seven segmant changes (sometims one second and sometimes 1.5 second it is not steady in spead

    i know that the code that the timer is embeded in may be the reasone

    that is why i am asking my question is there any method to calculate the real time of simulation like mplab ide?

    i mean if there a one i can reduce the 1 /100 frac. ti 1/99 to fast the sec unit and simulat untill i reach the desired value

    i know that i can try by burning the chip and run the circuit in the real life every time a make a modification in the code to get the final value and the nearest acc. but..................


    are not you see that it is a very very very hard method ???


    thnx for ....

    bye

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


    Did you find this post helpful? Yes | No

    Default

    Whether it's Melanie's Olympic Timer, or my Elapsed Timer (wasn't specified). I can guarantee that if you are getting 1.5 second periods... the problem is in your program. Both Timer programs have been scrutinized thoroughly by many different people.

    Unless you figure out what the problem is, this probably won't work either. However, this is the method you'll need to use, to measure exactly how long it takes to execute any block of PBP code.

    instruction execution time
    http://www.picbasic.co.uk/forum/show...=&threadid=365
    <br>
    Last edited by Darrel Taylor; - 13th September 2005 at 05:00.
    DT

  4. #4
    Join Date
    Jul 2005
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Hello

    You can use one of maxim's real time clocks, the calculate sec,min,hour, day........

    You can obtain an accuracy of 100% if you know how to use it well, also a nice feature is that you can use the built-in functions of I2C in PICBasic Pro to communicate with such RTCs.

    I never have seen exact 1 sec displayed at exactly 1 sec duration, its some how 1 sec and 0.000034 some fractions...

    So you better let the RTC calculate, and you control, its a nice idea, while you were thinking of a simple clock, you can do a full calender.

Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  3. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34
  4. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  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