[sdiy] Timing : How close is close enough?

Tom Wiltshire tom at electricdruid.net
Wed Feb 4 01:32:01 CET 2009


On 3 Feb 2009, at 23:15, Tom Arnold wrote:

> I realise that this has no proper answer, but....
>
> A project I've been working on needs a clock.  For this particular  
> project
> I've been working on a simple 555 clock which will be fine.   
> Hardest part
> has been getting it stable from .1 to 300hz while keeping it simple.
>
> Anyhow, someones post made me start thinking about doing one  
> digitally which
> could be a useful module, esp if it did all the common timings ( . 
> 25ppwn,
> .5ppwn, 1ppwn, 1ppqn etc etc

For a square wave clock where you need accuracy and don't have to  
worry about aliasing issues, this seems like a obvious choice.

> The question is, how close is close enough?

For me, it's close enough when the difference is no longer  
perceptible in any way by the majority of educated listeners.

> If I assume I'm going to set it
> to something between .1bpm and 300bpm, even if I chose my cpu clock  
> so its
> sometimes a clean division, I'm going to be off by a little bit  
> most of
> the time.

Yes, you are. But it's a very little bit.

> Assuming I can service the timing loop 10000times a second my
> error at 300bpm looks like it should be something less then .1% ( I  
> say
> "something less" as I did this in a spreadsheet to play with  
> timings and I
> dont have the sheet in front of me ).

I'd have thought you can do *much* better than "10000 times a  
second". This is an accuracy of 100uS. The cheap PIC 16Fs that I've  
used have timers that will run up to 5MHz IIRC (1/4 the max clock),  
which is an accuracy of 200 *nS*. This is an improvement of 3 orders  
of magnitude.

In short, a $2 chip will get you *so* close that you won't even  
bother asking if it's close enough.

T.




>
> I know this could devolve into a religious debate, but I'm curious  
> what
> people really think *is* close enough.  I mean, when you set that  
> 909 to
> 130bpm, has anyone bothered to see how close it really is?  And  
> yeah, I
> realise that the point of building a timing module like this is so it
> provides master timing for Everything so even if its off everything  
> is off
> by the same amount.
>
> Anyhow, this is the kinda stuff I lay awake at night thinking about...
>
> -- 
>  -----------------------------------------------------------------
>  - Tom Arnold       -  Free Synth DIY webspace http://www.sdiy.org
>  - SynthGeek        -
>  - BBD Fanatic      -  "...is it a virus, a drug, or a religion?"
>  - echo evho wjxo   -    Juanita Shrugs. "What's the difference?"
>  --------------------
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>





More information about the Synth-diy mailing list