I wanted to figure out the best way to run many LEDs quickly without using loads of IO pins. Here I tested using shift registers. I tried two methods, shiftOut() and SPI. I ran a test setting 16bits and recorded the time. Results:
- shiftOut() = 204 μs
- SPI = 16 μs
Clearly SPI is much faster. Below are both methods.