touble with a time calculation


Closed Thread
Results 1 to 40 of 59

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: touble with a time calculation

    Why not try something straight forward as this?

    Code:
         ' run this every second along with your clock code
         if (Hours >= Set_Hours AND Minutes >= Set_Min AND Seconds >= Set_Sec)
               OT_Seconds = OT_Seconds+1
               if (OT_Seconds > 59)
                   OT_Seconds = 0
                   OT_Minutes = OT_Minutes+1
                   if (OT_Minutes > 59)
                        OT_Minutes = 0
                        OT_Hours = OT_Hours+1
                        ' you may want to restrict / rollover the hours to 24 hours format here.
                   endif
               endif
         endif

  2. #2
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: touble with a time calculation

    sent you a pm

    cheers

    sheldon

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: touble with a time calculation

    Thanks

    For the code.

  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: touble with a time calculation

    Sheldon,

    I have had a look at your code but some work has come in and distracted me. I will give it some thought over the weekend and get back to you.

Similar Threads

  1. Help with calculation
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th August 2012, 17:10
  2. CHECKSUM CALCULATION, Please Help!
    By wasilus in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd August 2012, 07:55
  3. Calculation Problem - value goes to zero after 65
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 12th March 2010, 05:10
  4. calculation
    By lerameur in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th May 2008, 16:28
  5. CRC Calculation - Need a little help
    By Steve43 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 13th March 2005, 01:23

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