DIN sync in x0x boxes (was RE: [sdiy] Help-Blacet midi-din sync chip problems!)

Grant Richter grichter at asapnet.net
Mon Feb 11 17:44:43 CET 2002


Hi Colin,

Thank you for a well written and researched post. I may have to switch to
Smirnoff and Coke...
> 
> Well, I got fed up speculating what is going on inside these boxes, so I
> poured myself a double Smirnoff and Coke, warmed up the O-scope, and did
> some empirical science...
> 
> The CPU in a 303, 606 or 808 has a number of jobs to do -
> 1. scan the keys and switches, and refresh the LEDs
> 2. read the DIN sync input pins to detect the RUN status, and arrival of
> a clock pulse
> 3. playback a sequence at a rate controlled by the incoming sync pulses
> (which are switched externally from the CPU, so it doesn't know where
> they came from)
> 4. do the track edit and sequence edit stuff
> 
> The 303, 606 and 808 all have an 'interrupt clock' with a 1.8ms period
> (1.9ms on the 808) that drives the interrupt line of the CPU.
> I've often wondered which tasks are performed during the interrupt
> routine, and which during the main program.
> The answer to this question will determine what might happen if the
> interrupt timer is badly adjusted.
> Given the high probability that by now someone has been inside every
> 303, 606 or 808 ever made, and many will have been looking for an easy
> way to make it sound 'better', a lot of the interrupt timers are likely
> to be far from their intended setting.
> 
> The trimmer on my 303 will adjust the interrupt period between 0.6ms and
> 2.5ms.
> 
> Looking at the scanning pulses to the keyswitches and the drive pulses
> to the LEDs on the scope, while adjusting the interrupt clock, it's
> clear that the interrupt routine is responsible for the key scanning and
> LED refresh.
> 
> Driving the 303 from it's internal 50% duty cycle oscillator, and
> adjusting the interrupt timer over it's full range has no effect.
> Syncing the 303 from my MIDI to SYNC convertor (with a clock pulse
> length of 2ms), and adjusting the interrupt timer shows that as the
> period of the timer is increased above 2ms, the reliability of the sync
> rapidly falls off.
> 
> This shows the interrupt routine is also responsible for polling the DIN
> Clock input.
> A pulse shorter than the interrupt period can start and finish in
> between 2 interrupts, and not be seen by the CPU.
> If the main program loop was polling for the clock input, it wouldn't
> lose sync if it was being interrupted less than usual.
> 
> So, if you're syncing a 303 from a MIDI to DIN sync unit with a fixed
> pulse width, the interrupt timer *must* have a period less than the sync
> pulse length, or sync will be unreliable.
> Given this fact, I'm surprised the Blacet chips work well at all in the
> recommended configuration. 1ms just shouldn't be long enough.
> I'm also tempted to increase the pulse length I use to 3ms - this only
> limits the maximum tempo to somewhere over 400bpm, and means that even a
> badly adjusted 303 etc. should be able to see the pulse.
> 
> Why a 303/606/808 would fail to sync correctly to a 50% duty cycle sync
> pulse, I have no idea.
> It's possible that if the interrupt timer is set too high, the main
> program loop is starved of CPU time.
> This could have strange effects...
> 
> I'll need to have a think about how to determine whether the sequence
> playback is processed in the main loop, with the interrupt routine
> setting some flag to say a sync pulse arrived, or if the sequence
> playback is performed by the interrupt routine itself.
> 
> Until then, more vodka :-)
> 
> Colin f 
> 
> 
> 




More information about the Synth-diy mailing list