16 Port Parallel Output on Teensy 3.0 Missing Red Channel Hi,

16 Port Parallel Output on Teensy 3.0 Missing Red Channel

Hi, I’ve been sucked into work for a while, but I’m now feverishly working on getting my art car ready for the burn.

I’ve been playing with designing and milling boards (with an Othermill which I’m in love with).

Anyway, to make a long story short, I’ve been having a lot of trouble with the FastLed 3.1, Teensy 3.0 (and 3.1) and the Parallel Output stuff.

I’ve designed a board that takes two 74HCT245’s so that I can use the PortDC stuff. When I use the Teensy 3.0’s I’m somehow not getting any red output. I’m basically using the ParallelOutput demo (shortened for clarity)…

There’s a lot of stuff going on in my signal path (Teensy 3.0 → 74HCT245 → 100Ohm Resistor → Ethernet Cable → Ethernet Splitter → 100Ohm Resistor → WS2812, but since the problem is just with the red leds I’m assuming that something is going wrong on the software side…

Any clues? [Arduino 1.6.4, latest 3.1 branch, Teensy 3.0]

#include<FastLED.h>

#define NUM_LEDS_PER_STRIP 20
#define NUM_STRIPS 16

// Note: this can be 12 if you’re using a teensy 3 and don’t mind soldering the pads on the back

CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP];

void setup() {
LEDS.addLeds<WS2811_PORTDC,16>(leds, NUM_LEDS_PER_STRIP);
LEDS.setBrightness(255);
}

void loop() {
static uint8_t hue = 0;
for(int i = 0; i < NUM_STRIPS; i++) {
for(int j = 0; j < NUM_LEDS_PER_STRIP; j++) {
leds[(iNUM_LEDS_PER_STRIP) + j] = CHSV((32i) + hue+j,192,255);
}
}

// Set the first n leds on each strip to show which strip it is
for(int i = 0; i < NUM_STRIPS; i++) {
for(int j = 0; j <= i; j++) {
leds[(i*NUM_LEDS_PER_STRIP) + j] = CRGB(255,0,0);
}
}

hue++;

LEDS.show();
LEDS.delay(10);
}

Hi and sounds like a cool project. @Daniel_Garcia is away at Priceless this weekend, but after he’s back I suspect he’ll be able to help diagnose et c.

Ahh, If I use either port WS2811_PORTD or WS2811_PORTC then I can get red, but if I used PORTDC then I’m not getting red.

On a random lark (after reading some other posts) I tried adding #define FASTLED_ALLOW_INTERRUPTS 0
before the #include for FASTLed and it seemed to have brought back my red!

Ah - excellent. I wonder if the gap work that I’m doing for the 16-way output is tight enough that it doesn’t allow for interrupts? I should just disable interrupts in the 16-way output, I think.