Hey all,
I'm running adafruit's tlc59711 library on a teensy 3.1: https://github.com/adafruit/Adafruit_TLC59711
teensyduino 1.22
arduino 1.06
(same problem occurs in teensyduino 1.18-rc1 with arduino 1.05)
This is a breadboard situation, but I have the tlc59711 powered separately and co-grounded with the teensy. I understand that breadboards are not ideal environments for high-speed data testing. That being said, the flicker is consistent as to being in the lower brightness levels whether ramping up or down. Signals look clean wherever I scope them. Experience and intuition tell me it is code timing.
I run a simple brightness loop (code below) that ramps from 0 to 3000 (of 65535) increments of 20 (i+=20)
I notice some random flickering in the lower brightness registers (probably in the hundreds) as it ramps up. If I run the loop all the way to 65535, the flickering is not apparent in the higher brightness values.
When I scope the clk signal I notice that the clock stays high for two cycles occasionally (see image). Is this normal? could it cause such a flicker? It seems to happen every 8 clock cycles.
Here's a video (might not be super clear)
https://youtu.be/f8u6sNHwDro
I'm working on a PCB design that will have a tlc59711 and 4 bright RGB leds. It will be swrt, but I gotta fix this flicker.
PS the same flicker is apparent if I read color information off an SD card. I create a brightness ramp in photoshop, save it as raw, read it from the card and write the data to the LEDs...same lower brightness flicker.
Any insight would be AMAZING. go teensy!
I'm running adafruit's tlc59711 library on a teensy 3.1: https://github.com/adafruit/Adafruit_TLC59711
teensyduino 1.22
arduino 1.06
(same problem occurs in teensyduino 1.18-rc1 with arduino 1.05)
This is a breadboard situation, but I have the tlc59711 powered separately and co-grounded with the teensy. I understand that breadboards are not ideal environments for high-speed data testing. That being said, the flicker is consistent as to being in the lower brightness levels whether ramping up or down. Signals look clean wherever I scope them. Experience and intuition tell me it is code timing.
I run a simple brightness loop (code below) that ramps from 0 to 3000 (of 65535) increments of 20 (i+=20)
I notice some random flickering in the lower brightness registers (probably in the hundreds) as it ramps up. If I run the loop all the way to 65535, the flickering is not apparent in the higher brightness values.
When I scope the clk signal I notice that the clock stays high for two cycles occasionally (see image). Is this normal? could it cause such a flicker? It seems to happen every 8 clock cycles.
Code:
/***************************************************
This is an example for our Adafruit 12-channel PWM/LED driver
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/products/
These drivers uses SPI to communicate, 2 pins are required to
interface: Data and Clock. The boards are chainable
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include "Adafruit_TLC59711.h"
#include <SPI.h>
// How many boards do you have chained?
#define NUM_TLC59711 2
#define data 8
#define clock 7
Adafruit_TLC59711 tlc = Adafruit_TLC59711(NUM_TLC59711, clock, data);
//Adafruit_TLC59711 tlc = Adafruit_TLC59711(NUM_TLC59711);
void setup() {
pinMode(10, OUTPUT);
tlc.begin();
tlc.write();
}
void loop() {
colorRamp();
}
void colorRamp() {
for (long j = 0; j < 3000; j+=20){
for(uint16_t i=0; i<4*NUM_TLC59711; i++) {
tlc.setLED(i, j, j, j);
}
tlc.write();
delay(20);
}
}
Here's a video (might not be super clear)
https://youtu.be/f8u6sNHwDro
I'm working on a PCB design that will have a tlc59711 and 4 bright RGB leds. It will be swrt, but I gotta fix this flicker.
PS the same flicker is apparent if I read color information off an SD card. I create a brightness ramp in photoshop, save it as raw, read it from the card and write the data to the LEDs...same lower brightness flicker.
Any insight would be AMAZING. go teensy!