Hi
I think it depends on the manual you have, mine has MOD as a reserved word in it but an earlier version does not.
Cheers Pete
Hi
I think it depends on the manual you have, mine has MOD as a reserved word in it but an earlier version does not.
Cheers Pete
If anyone is wondering...
My code above does seem to test out working.
I modified my clock code to temporarily change the time to Sun March 13 01:59:45 (15 sec before DST should start) and then watched it change from 01:59 to 03:00 as it was supposed to.
Then I changed the time to Sun Nov 06 01:59:45 and watched it change from 01:59 to 01:00 as it should.
My nixie clock checks the date and time every morning at 05:00 and then calls my routine to test if STD/DST is in effect.
So over the next year it will be tested thoroughly.
In my case the nixie display is turned off between 10 pm and 6 am but it is still keeping time.
I'll have to ponder how to implement the above calculations into my overall code as I think I would still need to do a comparison between the current date and the calculated Start/End of DST.
I can't just abandon my baby (my version of the code) as I slaved over it for several hours
and it was a great challenge (as all code writing is)
But I will ponder implementing the apparently more simpler version in the near future.
thanks everyone
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Dwight
How are you getting the time? GPS?
Thanks and Regards;
Gadelhas
gadelhas,
from an ESP8266-01 wifi module.
Which is an amazing little wifi module that is connected to my home LAN.
check out my clock project here...
http://www.picbasic.co.uk/forum/showthread.php?t=20965
and check out my description of the ESP8266-01 module here...
http://www.picbasic.co.uk/forum/showthread.php?t=20957
The little ESP module is incredibly easy to work with and really interfaces to the PIC quite easily.
If you have more questions feel free to ask or PM me.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Unless you have a calendar you’d still want the data table anyway.
Any time you want to add or subtract time you need a calendar.
If the clock retrieves UTC time as 00:01 1st Jan 2016, and has to subtract one hour.
It has to know right down to days in month, leap years, the whole lot.
In my case I don't care about the date or year etc (other than to be used in the calculation to determine if DST is in effect or not)Unless you have a calendar you’d still want the data table anyway.
Any time you want to add or subtract time you need a calendar.
If the clock retrieves UTC time as 00:01 1st Jan 2016, and has to subtract one hour.
It has to know right down to days in month, leap years, the whole lot.
and my code does not require the year for the calculation. I just needed the month, date and day of week to run through my algorithm.
My clock simply displays HH:MM, the seconds are still tracked to know when to increment the minutes.
My code checks NTP time twice a day (at 0500 and 1500) and runs the calc.
The reason I don't check it 12 hours apart is because I want it to be most accurate first thing in the morning and when I get home from work.
The display is blank between 2200 and 0600.
As noted above the ESP module give me the time in STD time and then my code determines if I need to add 1 hour or leave the time as is.
So far it seems to be working correctly.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Dwight, Here is the code I flashed into the ESP8266-01 I use for NTP time service. It is NOT ESP8266Basic but the standard AT command set with an added set of commands to interface with the NTP pool.org for the NTP service. It also allows for all of the other AT commands to be used. I found the ESP8255Basic to be too unstable.
Dave Purola,
N8NTA
EN82fn
Bookmarks