For the moment this is more relative high level thought/learning process than it is a direct "how do i do this".
I have a few project ideas that require some accurate time keeping.
I want/will use Pic's. most likely any chip from the enhanced mid-range chips.
I want to use the internal oscillator the run the chip at maximum speed, simply to keep the PWM resolution up at high speeds.
most of these pics (maybe all of them?) have a Timer that can be connected to an external clock source.
Can i simply hook this timer up to a 32khz clock crystal and use interrupts to advance a variable that will be the time?
The chip i am considering at the moment is a PIC16F1574, but there is a large range of chips that have these features.
accuracy in line with a wrist watch would be acceptable, not looking to put a rocket into orbit or anything.
Not considering the code at the moment, but it would just be something simple that ran an interrupt every time the crystal timer overflowed, which simply added the correct ammount of time to the clock, with other code to turn over the hours, or maybe just turn over once a day, or hell, once a year. at 32mhz there should be plenty of processing power to decode the "time" number into something that could be output to a display, or used for some other purpose.
Does this sound practical? I am pretty new with these things.
I have a few project ideas that require some accurate time keeping.
I want/will use Pic's. most likely any chip from the enhanced mid-range chips.
I want to use the internal oscillator the run the chip at maximum speed, simply to keep the PWM resolution up at high speeds.
most of these pics (maybe all of them?) have a Timer that can be connected to an external clock source.
Can i simply hook this timer up to a 32khz clock crystal and use interrupts to advance a variable that will be the time?
The chip i am considering at the moment is a PIC16F1574, but there is a large range of chips that have these features.
accuracy in line with a wrist watch would be acceptable, not looking to put a rocket into orbit or anything.
Not considering the code at the moment, but it would just be something simple that ran an interrupt every time the crystal timer overflowed, which simply added the correct ammount of time to the clock, with other code to turn over the hours, or maybe just turn over once a day, or hell, once a year. at 32mhz there should be plenty of processing power to decode the "time" number into something that could be output to a display, or used for some other purpose.
Does this sound practical? I am pretty new with these things.