TomWhitwell / TuringMachine

Turing Machine Mk 2 Main Module
223 stars 41 forks source link

Race condition between input clock and shift register #46

Open jstenroos opened 7 years ago

jstenroos commented 7 years ago

Hi,

I've wondered why my TM Mk2 causes an extra trigger when using the pulse out to Maths / Function trigger in. By extra trigger I mean that after a normal pulse out, Maths fires on the next blank step, too. For example if I have a 4 step looping sequence with 1 active pulse on step 1, Maths triggers on both step 1 and 2. (RadioMusic reset input also reacted to it, but I added an extra check to the interrupt handler in code and problem was solved. )

I think I've found the reason, and was also able to capture it with my oscilloscope. In first blank step after a non-blank step the shift register goes down the same time as the input clock goes up, and there is an AND-operation between them, which causes an extremely short pulse on the output. I guess the actual timing varies between units, so it's perfectly possible that the problem does not exist in many units.

The Pulses mk2 expansion also inherits this problem.

Maybe a very mild low pass filter in the Pulse out would solve the problem? In my system, it's enough to route the Pulse out via a passive multiple to more than one location and the problem is gone. So, it's just on the edge.

-Jouni

jstenroos commented 7 years ago

Managed to fix the problem, I soldered a 470pF ceramic capacitor on the pulse output. Probably not optimal value but didn't have any other available. Overall voltage drops slightly on the output but gates still reach almost 8V which is plenty. Next, the same for all outputs on the pulses expander, have to buy some capacitors first, though. Any suggestions on the values?