Electronic – How should I route SPI lines

pcb-designspi

In my schematic, I have 4 SPI devices to hook together. I am going to operate the SPI up to 8MHz. Should I be concerned with installing damping resistors? source termination resistors? Should I route them in a star formation, or in a serial fashion? Does adding lots of vias hurt the signal integrity?

I also have to add that these devices are quite close together, within 25mm of each other.

Best Answer

From a signal integrity perspective, 8MHz isn't actually that fast so you can probably get away with any reasonable layout. You might want to include termination resistors in the layout. If you don't need them you can just install 0 ohm resistors and then leave them out in the next revision. I would lay out (star versus serial) with whatever gives you the tighter layout (e.g. shorter traces). Stubs are considered a bad thing for high speed layout, so I'd pick one or the other and not have some scheme where some parts are tied together serially and others are branched off from that. When laying out in a serial fashion, keep the stubs off the main lines as short as possible. Adding vias does hurt signal integrity, but as I mentioned, you most likely have such a large timing budget at 8Mhz that it does not matter. The other question is, do you have a ground and power plane? If so, you want to keep the signals referenced to the same plane (e.g. don't run the SCLK trace on one side of the board referenced to the ground plane and then via to the other side and run for a while referenced to the power plane). You'll probably have to worry about EMC issues here long before you'll have to worry about signal integrity issues, but EMC may not be a concern for you project.