Permalink
Browse files

1 MHz SPI max speed for latest pixels

  • Loading branch information...
1 parent d22622a commit 730ef372a26326b8da78ea7087a66fdac57efb8c @PaintYourDragon PaintYourDragon committed Mar 14, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −7 Arduino/LEDstream/LEDstream.pde
@@ -100,13 +100,7 @@ void setup()
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
- SPI.setClockDivider(SPI_CLOCK_DIV8); // 2 MHz
- // WS2801 datasheet recommends max SPI clock of 2 MHz, and 50 Ohm
- // resistors on SPI lines for impedance matching. In practice and
- // at short distances, 2 MHz seemed to work reliably enough without
- // resistors, and 4 MHz was possible with a 220 Ohm resistor on the
- // SPI clock line only. Your mileage may vary. Experiment!
- // SPI.setClockDivider(SPI_CLOCK_DIV4); // 4 MHz
+ SPI.setClockDivider(SPI_CLOCK_DIV16); // 1 MHz max, else flicker
// Issue test pattern to LEDs on startup. This helps verify that
// wiring between the Arduino and LEDs is correct. Not knowing the

0 comments on commit 730ef37

Please sign in to comment.