Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2014-10-10 09:01:42 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-10-10 09:01:42 +0400
commitb0225bb185b5d3350fde4f7c668de70610773add (patch)
tree94fda51f6183e1344f68d10d90277ec8ea980b05
parent97f45ca07c3e66ec9f84509b53ec12d0d6fa5dbf (diff)
Adjusting timings for k20 based clockless chips
-rw-r--r--chipsets.h8
-rw-r--r--clockless_arm_k20.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/chipsets.h b/chipsets.h
index dbfec665..e2929990 100644
--- a/chipsets.h
+++ b/chipsets.h
@@ -366,7 +366,7 @@ protected:
// We want to force all avr's to use the Trinket controller when running at 8Mhz, because even the 328's at 8Mhz
// need the more tightly defined timeframes.
-#if (F_CPU == 8000000 || F_CPU == 16000000 || F_CPU == 24000000 || F_CPU == 48000000 || F_CPU == 96000000) // 125ns/clock
+#if (F_CPU == 8000000 || F_CPU == 16000000 || F_CPU == 24000000) // || F_CPU == 48000000 || F_CPU == 96000000) // 125ns/clock
#define FMUL (F_CPU/8000000)
// LPD1886
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
@@ -437,10 +437,10 @@ class TM1809Controller800Khz : public ClocklessController<DATA_PIN, NS(350), NS(
#warning "Not enough clock cycles available for the TM1809"
#endif
-// WS2811 - 400ns, 400ns, 450ns
+// WS2811 - 320ns, 320ns, 640ns
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
-class WS2811Controller800Khz : public ClocklessController<DATA_PIN, NS(400), NS(400), NS(450), RGB_ORDER> {};
-#if NO_TIME(400, 400, 450)
+class WS2811Controller800Khz : public ClocklessController<DATA_PIN, NS(320), NS(320), NS(640), RGB_ORDER> {};
+#if NO_TIME(320, 320, 640)
#warning "Not enough clock cycles available for the WS2811 (800khz)"
#endif
diff --git a/clockless_arm_k20.h b/clockless_arm_k20.h
index b7f45ad6..126955b1 100644
--- a/clockless_arm_k20.h
+++ b/clockless_arm_k20.h
@@ -79,7 +79,7 @@ protected:
next_mark = ARM_DWT_CYCCNT + (T1+T2+T3);
FastPin<DATA_PIN>::fastset(port, hi);
if(b&0x80) {
- while((next_mark - ARM_DWT_CYCCNT) > (T3+(3*(F_CPU/24000000))));
+ while((next_mark - ARM_DWT_CYCCNT) > (T3+(2*(F_CPU/24000000))));
FastPin<DATA_PIN>::fastset(port, lo);
} else {
while((next_mark - ARM_DWT_CYCCNT) > (T2+T3+(2*(F_CPU/24000000))));
@@ -93,7 +93,7 @@ protected:
FastPin<DATA_PIN>::fastset(port, hi);
if(b&0x80) {
- while((next_mark - ARM_DWT_CYCCNT) > (T3+(3*(F_CPU/24000000))));
+ while((next_mark - ARM_DWT_CYCCNT) > (T3+(2*(F_CPU/24000000))));
FastPin<DATA_PIN>::fastset(port, lo);
} else {
while((next_mark - ARM_DWT_CYCCNT) > (T2+T3+(2*(F_CPU/24000000))));