[sdiy] SPI comms - how fast is reasonable?
Tom Wiltshire
tom at electricdruid.net
Fri Mar 5 18:40:31 CET 2010
Hi All,
Today I've been learning about SPI communications, and getting one
PIC talking to another. For this I have a pair of 16F767's
(transmitter and receiver). The receiver has an LCD attached to
display data that it picks up. The idea is to use this basic test
setup to get a protocol worked out for synth parameter data
transmission. Once that is done, I'll have a known-good transmitter
that I can then use to send parameter data to dsPICs. Doing the
testing with a PIC and a dsPIC directly is a pain in the rear because
MPLAB has to download a different OS into the ICD2 clone programmer I
use every time you switch chips.
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.
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.
Thanks,
Tom
More information about the Synth-diy
mailing list