summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-11-17 21:57:39 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2016-11-17 21:57:39 (GMT)
commitbf2129eefefe34826059844fcb22976e2f7c7b65 (patch)
tree4f52f6cd8f1a4287e95ea58d461f3b0b89462089
parenta034ecbab968a4843e45d3a520a78d2bc9b07ed6 (diff)
downloadabc80-bf2129eefefe34826059844fcb22976e2f7c7b65.zip
abc80-bf2129eefefe34826059844fcb22976e2f7c7b65.tar.gz
abc80-bf2129eefefe34826059844fcb22976e2f7c7b65.tar.bz2
abc80-bf2129eefefe34826059844fcb22976e2f7c7b65.tar.xz
neopixel.v: document the official timing for various neopixels
List the official timings for WS2811, WS2812, WS2812B and SK6812 neopixels. Note that the timing for WS2811 may be barely met in high speed mode; it will not work in low speed mode. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--neopixel.v16
1 files changed, 13 insertions, 3 deletions
diff --git a/neopixel.v b/neopixel.v
index 9de6f77..5f69df6 100644
--- a/neopixel.v
+++ b/neopixel.v
@@ -13,7 +13,7 @@
//
// neopixel.v
//
-// Driver for WS2812 (neopixel) LED chains
+// Driver for WS281x/SK6812 (neopixel) LED chains
//
// This drives 32 output channels and expects a 25 MHz clock.
// As long as the external RAM can keep up, the number of channels
@@ -42,8 +42,18 @@ module neopixel (
);
// Code assumes pulse0 < pulse1
- parameter pulse0 = 8;
- parameter pulse1 = 20;
+ //
+ // Documented times (in ns) are (±150 ns):
+ //
+ // WS2811 WS2182 WS2812B SK6812
+ // T0H 250/500 350 400 300
+ // T1H 400/800 800 800 600
+ // TH+TL 1250/2500 1250±600 1250±600 1250±600
+ //
+ // Our cycle time is 32x40 ns = 1280 ns.
+ //
+ parameter pulse0 = 8; // 320 ns
+ parameter pulse1 = 20; // 800 ns
// Pipeline stages:
// A - generate address for config/status RAM