24 hour clock
For a 24 hour clock to base some events around, can a counter be just as accurate and drift-free as an external IC? If so, isn't there a minimum of 1 pin that has to be sacrificed? If there was a guesstimate on drift what would that be over 1 year? Thanks
Comments
Don't remember off the top of my head, but Andy Lindsey goes into some detail about it in the PE Kit Labs. I am pretty sure it is in the second lab!
Dallas/Maxim has a temperature compensated crystal oscillator (see: www.maxim-ic.com/quick_view2.cfm/qv_pk/2940) that's good to 1 minute per year and can be attached to a counter or one of their real time clocks like the DS1307 (which could be attached to the same pins as the boot EEPROM saving an extra pin or two).
Sorry if I misread your question, If you are thinking of useing the propeller as a time base look at the PE Lab.
Mike,
Any chance that oscillator could be used as a clock source for the Prop or does it just count out seconds or something?
There is no telling how many of them there·is in my room!
I've been following the development of the Dallas RTC chips. They have just this week released the data sheet for the DS32C35, which contains a 3.5ppm RTC (-40 to +85 degC), with FRAM memory (up to 8kbytes), heartbeat/alarm output and I2C interface, 3.3 volt power.
Mike, I think the 32khz cannot be multiplied by the PLL--The PLL only accepts around 4-8mhz input.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I have built a clock with a 5 Mhz crystal driving the prop at 80MHz.
I think I have set it about 3 weeks ago and I have lost today 15 seconds.
Perhaps one could add a software correction factor.
Christof
Graham
··· = 1814400 seconds.
15 seconds of drift means 15 parts of·drift over an elapsed time of 1.8e6 seconds, which is roughly 8 parts per million.
This is probably not unrealistic for a 30ppm or even 50ppm crystal. You'll probably do worse as you move away from room temperature - and with ageing.
You could include a temperature sensor on your board, and map the crystal accuracy. The problem is you've got to do it for every board. This leaves 2 options:
1)·It takes several·months to calibrate each board if you don't have access to a super accurate reference (Oh, and a temperature chamber).
2) If you have a super accurate reference, then the process could probably be completed in a day or two (you need to let the temperature chamber stabilize before doing the calibration). With a 5Mhz crsytal at 30ppm you're drifting by 150 cycles every second!
You'd need to pick the right number of temperature calibration points for your application, but half a dozen points and some linear interpolation will probably get you most of the way to your target accuracy.
·
You can also use the 1PPS from a cheap "atomic" clock to use as a time base. Reading the actual WWVB data can be done, but is not easy.
I set up a somewhat more complex system. I have a GPS unit mounted on my roof, and and read the time/date and rebroadcast it locally using a 433mHz transmitter like Parallax sells. Then I can use a cheap USD15 receiver to get the time anywhere in my house. I have a Nixie clock, aquarium timer and garden timers all running on the same time base. It's great because I never need to set the time on any of my devices, don't have to use any I/O for setting the time, just one pin for the 433mHz receiver. If you are going to have more than one project around the house, it is a great way to go. I got the GPS ( a Motorola Oncore II) cheap on e-pay, and the whole setup cost me less than USD50. Mind you, I did scrounge a lot of the parts including the water-proof enclosure for the GPS. It would cost more if just ordering the parts.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot