1 MHz SPI max speed for latest pixels

This commit is contained in:
Paint Your Dragon 2012-03-14 11:31:27 -07:00
parent d22622a402
commit 730ef372a2
1 changed files with 1 additions and 7 deletions

View File

@ -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