-->
Page 1 of 2

TLC5940 project

PostPosted: Fri Jul 24, 2015 9:18 pm
by ematson5897
I'm working on hooking up a TLC5940 to these just to try, so I need to know a few things:

1) is there an ESP equivalent of an arduino timer interrupt? I know there's the ticker library, but I will probably need more speed, and for some reason SPI doesn't work from functions called by a ticker.

2) What is the best way to get a high speed clock output from the ESP? It doesn't need to be in sync with anything, I just need a high speed PWM clock


Any help would be great! Thanks in advance

Re: TLC5940 project

PostPosted: Fri Jul 24, 2015 10:43 pm
by kolban
The ESP8266 already has PWM built into it. Didn't know if you knew that.

Re: TLC5940 project

PostPosted: Fri Jul 24, 2015 10:48 pm
by ematson5897
Yea but I'd rather have more outputs. Plus I'm hoping to use small sections of LED strips, so using the TLC's will be better for ~80ma loads

Re: TLC5940 project

PostPosted: Sat Jul 25, 2015 12:28 pm
by ematson5897
Just an update as to my progress, it seems like I might be able to get by on what I have now. I can use the 2nd serial interface to generate a square wave at up to 2MHz, which should work for now. It looks like the ticker library can handle interrupts every 4096 cycles of the serial interface "clock", not a permanent solution by any means, but it will work for now. I'll probably just go straight to the timer code instead of using the ticker wrapper just to not have to deal with using another library.