[sdiy] SPI comms - how fast is reasonable?

ASSI Stromeko at nexgo.de
Fri Mar 5 20:55:04 CET 2010


On Friday 05 March 2010, Tom Wiltshire wrote:
> Anyway, I've got the basics running, but I'm currently running the
> SPI clock at 20MHz/64 = 312.5KHz. The chip can also run it at
> 20MHz/ 16 which would obviously be preferable (why hang about?)
> but that is producing glitchy data. The datasheet says that 10MHz
> is possible.

If the data is already glitching at a sub-MHz clock, there's something 
afoul that should either show up directly on scope or is a simple 
configuration mistake.  You might check if change of data on the 
driver and sampling of data on the receiver really happens on 
different clock edges, several conventions about where those need to 
be and how much setup and hold time the select signal should have do 
exist.  Most SPI masters will allow you to configure it either way, 
while most slaves insist that their way is the only one (so much about 
master and slave).

> What do I need to watch out for trying to send >1MHz (up to 10MHz
> in theory) SPI clocks and data around? Is it realistic to expect
> this to work on a breadboard?

I personally wouldn't want to go much above 2MHz on breadboard for 
daisy-chained SPI unless it was really needed, but point-to-point 
could easily go higher than that with a bit of care.  In any case if 
you do that, you need to figure out what the driver stages expect to 
see as load (maybe they can be configured differently for speed, slew 
rate and/or impedance) and provide proper termination of the SPI bus 
accordingly.  SPI bus is strictly incident signaling, so there should 
be little ringing or reflections.

> How long can flying wires between transmitter and receiver be?

Flying wires might not be so bad if you don't care about EMI into 
other circuits, solderless breadboards can be more tricky if you run 
data and clock in long, parallel tracks.  If you have a dual-trace 
scope, overlay the signals at the beginning and the end of the bus, 
any problems with termination or drive strength should be obvious from 
that and you can nicely monitor if your termination attempts take the 
right or wrong turn.  If you need longer wires and higher frequency, 
CAT5 ethernet cable is a good and relatively cheap source of 
controlled impedance wiring (don't undrill it at the ends if you roam 
far double digit MHz territory) and often saves you the bother of 
dealing with coax.  And if you're in a pinch, a few drills more or 
less per inch will often change the impedance enough to provide a 
better match.


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




More information about the Synth-diy mailing list