little problem with SPI at > 1MHz

Posted by Erik Nyquist on Tue 18 Dec 2012 01:45 PM — 3 posts, 18,095 views.

#0
Hello, I'm trying to get 2 arduinos to talk to each other over SPI. Now it works just fine, as long as SCK is at 1MHz or lower (DIV16, DIV32, DIV64 or DIV128).
My program is simple, the master sends a string of numbers (0-255) and the slave prints these numbers out in hex, checking them to ensure all bytes have been recieved. If there is a mismatch, it stops.

At 1MHz, it will happily run for hours without a mismatch, but anything higher causes a mismatch within less than a second.

Has anyone got any advice on properly terminating the SCK line? currently I just have jumper wires (very short, not more than 6cm) between the two arduinos.

Surely impedance matching isn't necessary for such short distance/low freq?
Australia Forum Administrator #1
Template:Arduino
Please post Arduino-related questions to the Arduino Forum or to StackExchange: Arduino. This saves splitting questions and answers between this forum and the Arduino ones.
#2
Hopefully you found the answer, best results I got with SPI was using very thin solid wire and some resistors to reduce the noise on the spi lines. I was able to reach results up to about 43 MHz reliably this was for a SD-card spi interface though.