DS1307 accuracy


Results 1 to 17 of 17

Thread: DS1307 accuracy

Threaded View

  1. #17
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Extract from my routine for setting T&D... for convenience, I set YEAR, then MONTH and finally DAYS... here I set the maximum number of Days you can increment the DAY count to...

    Code:
    		RTCDayMax=31
    		If RTCMonth=4 then RTCDayMax=30
    		If RTCMonth=6 then RTCDayMax=30
    		If RTCMonth=9 then RTCDayMax=30
    		If RTCMonth=11 then RTCDayMax=30
    		If RTCMonth=2 then
    			RTCDayMax=28
    			If (RTCYear&03)=0 then RTCDayMax=29
    			endif
    Stupidly, the DS1307 can be set for Day 55 in month 55 in year 55. It's just a brainless incremental counter that checks for validity once it rolls past midnight. So you CAN have a DAY of total rubbish before it becomes sensible.

    Well yes... you CAN convert UTC (say from a GPS Data-stream) to Local Time at any part of the globe... the Time difference is simply 1 HOUR per 15 Degrees rotation away from the Prime Meridian (which you can also get from the GPS). It's actually based on 15 Degree wide BANDS the centres of which are 15 Degrees apart from the Prime Meridian. The trouble is, the Great-Circle Meridians comprising the Band edges have been skewed in many parts of the world to maintain the same Local Time across for example whole groups of Pacific Islands or other geographic anomalies which otherwise would put an odd corner of a country or region into another Time Zone. So whilst you CAN easilly work out EXACT LOCAL TIME based on Longitude, without actually containing a Database to correct for the odd skew here and there, you're pretty much, well... skewed!

    And then of course you need a Second Database, to hold Daylight Savings information, because different parts of the world have different Dates (and Times) that they switch. The UK for example just had their Summer-Time switch at 2am last Sunday morning. Other parts of the world have already had it - some yet to have it... don't you just love Time? Such a simple subject (dividing the rotation of the planet into equal increments), yet made so complex...

    Finally we get to the good folks that need to pray at Sunrise and Sunset... with published Tables and Charts of the exact time of the event based on where on the Globe you happen to lay down your prayer mat. Did any one of the great scholars that compile these charts stop and think that Sunrise and Sunset is effected by ELEVATION and if you happen to be at the bottom of a North-South running mountain range on the Western side at Sunrise or the Eastern side at Sunset affects the outcome quite CONSIDERABLY? Nope! Anybody know if it messes your chances of getting to Heaven if you get it wrong?
    Last edited by Melanie; - 30th March 2010 at 01:22.

Members who have read this thread : 1

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