When is 4.000MHz not 4.000MHz?
When is 4.000MHz not 4.000MHz?
Not really a big issue, and not really looking to 'solve' it, just a peculiar observation.
Two SBCs of the same design, same board. One 65C02, one 65SC02.
Both systems running identical software, same hardware other than the CPU.
4.000 MHz can oscillators in both.
Time is kept with a 10ms timer from a 6522 triggering an NMI.
One system has lost 1s of time vs the other over the last 48 hours or so.
Very peculiar, and of no consequence to anyone or anything.
This seems well outside of the normal tolerance for Crystals to me, but checking the math again, maybe not!
Maybe I will hook the clock from one to the 2nd and run them off the same clock signal to see what happens.
Two SBCs of the same design, same board. One 65C02, one 65SC02.
Both systems running identical software, same hardware other than the CPU.
4.000 MHz can oscillators in both.
Time is kept with a 10ms timer from a 6522 triggering an NMI.
One system has lost 1s of time vs the other over the last 48 hours or so.
Very peculiar, and of no consequence to anyone or anything.
This seems well outside of the normal tolerance for Crystals to me, but checking the math again, maybe not!
Maybe I will hook the clock from one to the 2nd and run them off the same clock signal to see what happens.
Last edited by thedrip on Tue May 19, 2020 9:51 pm, edited 1 time in total.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Which is 4.000MHz not 4.000MHz?
thedrip wrote:
One system has lost 1s of time vs the other over the last 48 hours or so.
Very peculiar, and of no consequence to anyone or anything.
This seems well outside of the normal tolerance for Crystals to me, but checking the math again, maybe not!
Very peculiar, and of no consequence to anyone or anything.
This seems well outside of the normal tolerance for Crystals to me, but checking the math again, maybe not!
If they're truly specified for 4.000MHz, that's only four significant figures, whereas 1s after 48 hrs is more than five significant figures. Even if the oscillator frequency error were spec'ed to be <0.001%, 1s after 48 hrs would still be within spec. If it does become a problem, your time-keeping ISR could take in a correction factor where it adds or subtracts one tick for every so many.
Edit: Did you mean to make the title, "Re: When [not 'which'] is 4.000MHz not 4.000MHz?"? You can still edit it.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Which is 4.000MHz not 4.000MHz?
GARTHWILSON wrote:
Edit: Did you mean to make the title, "Re: When [not 'which'] is 4.000MHz not 4.000MHz?"? You can still edit it.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: When is 4.000MHz not 4.000MHz?
thedrip wrote:
Two SBCs of the same design, same board. One 65C02, one 65SC02...One system has lost 1s of time vs the other over the last 48 hours or so.
BTW, are you sure the interrupt generated by the VIA is being correctly processed? A occasional missed interrupt would cause your clock to gradually slow down.
Also, note that a 100ppm spec doesn't guarantee the oscillator is operating at the stated frequency. That spec refers to drift. The oscillator could be within its rated drift and just be oscillating a bit too slowly. Take a look at the data sheet and see what the percent accuracy is for the oscillator you are using.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: When is 4.000MHz not 4.000MHz?
I have 1 oscillator from Jameco, it kept perfect time for over 6 months. This 2nd oscillator is a China special. I think I know which one to suspect!
Like I said, no impact to anything, just funny to see two "identical" SBC's turn out to be not quite identical.
Like I said, no impact to anything, just funny to see two "identical" SBC's turn out to be not quite identical.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: When is 4.000MHz not 4.000MHz?
thedrip wrote:
I have 1 oscillator from Jameco, it kept perfect time for over 6 months. This 2nd oscillator is a China special. I think I know which one to suspect!
Like I said, no impact to anything, just funny to see two "identical" SBC's turn out to be not quite identical.
Like I said, no impact to anything, just funny to see two "identical" SBC's turn out to be not quite identical.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: When is 4.000MHz not 4.000MHz?
Found a data sheet for what it's labelled as. I of course don't trust the label at all, but the datasheet calls it a +- 0.1% part, so no surprise that the time keeping isn't very accurate!
I have a 5 pack of these, some day I will put a them on a frequency counter and see just how far off nominal they are.
I have a 5 pack of these, some day I will put a them on a frequency counter and see just how far off nominal they are.
Re: When is 4.000MHz not 4.000MHz?
It makes sense to me: for a lot of purposes, 1000ppm is enough, and it'll be easier to make, so it can be cheaper.
Re: When is 4.000MHz not 4.000MHz?
If I didn't have two displays side by side, I wouldn't have noticed.
1 minute fast over 3-4 months? Close enough!
1 minute fast over 3-4 months? Close enough!
Re: When is 4.000MHz not 4.000MHz?
thedrip wrote:
If I didn't have two displays side by side, I wouldn't have noticed.
1 minute fast over 3-4 months? Close enough!
1 minute fast over 3-4 months? Close enough!
Aaaaannndddd.... 3-4 months without hitting reset? That's (a) impressive, and (b) means you need to tinker more
Cheers,
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: When is 4.000MHz not 4.000MHz?
thedrip wrote:
If I didn't have two displays side by side, I wouldn't have noticed.
1 minute fast over 3-4 months? Close enough!
1 minute fast over 3-4 months? Close enough!
BTW, I must've gotten lucky with the 3.6864 MHz oscillator that's in my POC V1.2 unit. According to the logic analyzer, the actual output frequency is 3686397 Hz, based upon a sample rate of 5ns. That's an accuracy of 99.9999 percent. That oscillator is the time base for both DUARTs, one of which generates a 100 Hz jiffy IRQ, which in turn, drives the system uptime and time-of-day software clocks. Assuming the oscillator doesn't drift, the uptime and time-of-day will be about 32 seconds slow over a one year period, an average loss of 2.67 seconds per month. Based upon past experience, that's actually better than the real-time clock accuracy of most server motherboards.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: When is 4.000MHz not 4.000MHz?
drogon wrote:
thedrip wrote:
If I didn't have two displays side by side, I wouldn't have noticed.
1 minute fast over 3-4 months? Close enough!
1 minute fast over 3-4 months? Close enough!
That means when you pop some popcorn it gets done a little sooner.
Quote:
Aaaaannndddd.... 3-4 months without hitting reset? That's (a) impressive, and (b) means you need to tinker more 
http://forum.6502.org/viewtopic.php?f=4&t=1457&start=270#p29284
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: When is 4.000MHz not 4.000MHz?
My uptimes aren't nearly as impressive. My machine sits in a BASIC loop redrawing Mandelbrot sets in different colors.
My not nearly as impressive or informative Youtube video.
https://www.youtube.com/watch?v=5WBXG1EIiCY
My not nearly as impressive or informative Youtube video.
https://www.youtube.com/watch?v=5WBXG1EIiCY
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: When is 4.000MHz not 4.000MHz?
thedrip wrote:
My uptimes aren't nearly as impressive. My machine sits in a BASIC loop redrawing Mandelbrot sets in different colors.
My not nearly as impressive or informative Youtube video.
https://www.youtube.com/watch?v=5WBXG1EIiCY
My not nearly as impressive or informative Youtube video.
https://www.youtube.com/watch?v=5WBXG1EIiCY
A fun exercise would be to work out how to do the same in assembly language and see how much of a speed-up occurs.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: When is 4.000MHz not 4.000MHz?
Borrowed a frequency counter, just to see...
The original oscillator I was using comes out at 3,999,940+-20 Hz.. max error of 15PPM is pretty acceptable.
The "questionable" Chinese oscillator has never been lower than 3,999,980 and usually hangs out in the 3,999,998 range, depending on room temp. I would say that 5PPM in a 20 degree temp range (65-85F) is perfectly good for ebay possibly-relabeled parts!
The original oscillator I was using comes out at 3,999,940+-20 Hz.. max error of 15PPM is pretty acceptable.
The "questionable" Chinese oscillator has never been lower than 3,999,980 and usually hangs out in the 3,999,998 range, depending on room temp. I would say that 5PPM in a 20 degree temp range (65-85F) is perfectly good for ebay possibly-relabeled parts!