Go Down

Topic: Can't find old topic on clock compensation (Read 4 times) previous topic - next topic

KeithRB

Quote
I don't think an external RTC would work, as I want to be able to set the clock if needed.


?????

What would be the point of an RTC if you could not set it?

randomizer

From what I understand, an RTC just sends out the time the the µC. Is there a way to set it while it's in motion? I'm thinking of regular Hour/Minute set buttons on a clock. I have the clock code already, so all I really need is an accurate timing signal.

I also want to keep pin use down, as I'm almost full-up.

Jack Christensen


As I think about it more, I realize I couldn't really use the µC to monitor the µC--how is it supposed to know what the "correct" frequency is when its internal osc is is the one that's off? Silly me.


Exactly!

Quote

I have a frequency meter--the MS8268. It reads 59.98 Hz from the wall, but gets nothing from the CLKO pin (which I know is putting the clock out, 'cause an LED glows when attached). I should have one test lead on CLKO and one on ground, right? Maybe it's just cheap Chinese junk...


Or maybe it's only good to 200kHz like the spec sheet says. CLKO has 8MHz on it, yes?

Quote

I think I'll get the TCXO from DigiKey. All my code needs is an accurate 1Hz (or 0.2Hz, even) interrupt to count the seconds. I don't think an external RTC would work, as I want to be able to set the clock if needed.


An RTC can be set and read by the µC, this is exceedingly common, google around. RTCs like the Chronodot/DS3231 or DS1307 need two µC pins, specifically the I2C bus, which on an Uno are A4 and A5 (SDA and SCL).
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

dhenry

Quote
Maybe it's just cheap Chinese junk...


Or it is being mis-used.

randomizer


Or maybe it's only good to 200kHz like the spec sheet says. CLKO has 8MHz on it, yes?


Well, perhaps. Atmel distributes "firmware" with note AVR4001 that theoretically outputs the watch-crystal signal--but it didn't have anything for the 328P, only the 168 or 169. Maybe I can't actually output that clock signal. That could well be it.

Go Up