[sdiy] SPI comms - how fast is reasonable?
Eric Brombaugh
ebrombaugh1 at cox.net
Fri Mar 5 19:30:24 CET 2010
On 03/05/2010 10:40 AM, Tom Wiltshire wrote:
> 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?
> How long can flying wires between transmitter and receiver be?
>
> I'd appreciate any experience/pointers anyone can offer to help me get
> SPI comms working as fast as is reasonably possible.
I've had pretty good luck with SPI clock rates in the 1-5MHz range on
perfboard with no special attention to lead dress.
If you're using solderless breadboard be aware that capacitive coupling
between adjacent terminal rows can be pretty strong at these rates
though. I've had to take some fairly drastic measures to keep adjacent
terminals from interfering with each other when both were carrying fast
clocks. If you don't have sensitive clock pins immediately next to each
other though you should be able to go pretty fast. The SPI ports on PIC
parts are pretty flexible - try cranking the rate up and see where the
wheels come off, then back off to give it some margin. Once you build
the circuit up more permanently it'll work great.
On PC boards it's fairly easy to get SPI working up to the maximum
specified rates for the components - typically in the 50-60MHz range.
I've got a SPI flash talking to an FPGA at 25 MHz on my latest project
with no trouble at all.
Eric
More information about the Synth-diy
mailing list