LPD6803 LED string on T3.0 with FastSPI_LED

Status
Not open for further replies.

oddson

Well-known member
I have a short string of LDP6803-based LEDs and I'd like to use a Teensy 3.0 to control them.

I understand this chip is not supported by FastLED.... any advice on whether/how to use FastSPI_LED with a Teensy 3.0?
 
Last edited:
I have read on the inter-webs that an earlier version of FastLED supported the LDP6803. But more recent version do not.

Adafruit has a library for LDP6803 and Arduino. I have not used it. I looked through the library code. LDP6803 uses a 2 wire interface: data and clock. The Adafruit library appears to use a bit-banging approach and the user can specify the digital pin to use for each, data and clock. I don't see anything in it that won't work on a Teensy but I might have missed something. So, it might work on Teensy. Try it!
 
any advice on whether/how to use FastSPI_LED with a Teensy 3.0?

I re-read your post. The only thing I can think of are:
A: Use an older version ( 1.<something>), not 3.x) of FastLED, or
B: contact the FastLED creators and ask if they will support it. That might be unlikely given that they've already made the decision to drop LPD6803 many versions ago. Ask if they have any other suggestions?
 
yeah I've read some of the same things... the old version is called FastSPI_LED (the new one dropped the SPI from the name with support for other communication protocols).

I was wondering if anyone has direct experience with the OLD library on a non-AVR Teensy?
I'm going to give it a try but I'm out of my element (non-MIDI!) so I'm hoping to get some advice on avoiding the rocks along the way.

For example the .cpp of the old library starts with the following:
Code:
#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
  #include <pins_arduino.h>
#else
  #include "WProgram.h"
  #include <pins_arduino.h>
#include "wiring.h"

I'm skeptical if stuff like this will work with Teensy at all without a bunch of changes I may not be competent to make.

Right now I'm not even really sure how the shifting address thing works :confused:

If a T2.0 would work better I could pry one out of an old project... but only if I knew I could get it to work much easier.

BTW - I'm not looking to do fancy control... just twinkling and slow colour shifts on a 15 light string for a Christmas decoration (lighting a miniature Christmas village).
 
FastSPI_LED was widely used on Teensy 3.0 a couple years ago.

If you go back to the old versions, probably the biggest obstacle you'll face is the many C++ parsing bugs that ctags added to Arduino. They're still fixing problems. FastLED was hit the hardest, due to extensive use of C++ templates and other features. You'll probably need to go back to Arduino 1.6.5 or even Arduino 1.0.6. I generally keep support for old Arduino versions right before Arduino made major changes, for exactly this sort of reason.

There was a brief period in FastLED's history where KINETISK_SPI0 was named only SPI0 in kinetis.h. That was a rather shortsighted mistake on my part. If you find a version that gives errors about SPI0 or SPI_t undefined, probably the simplest thing would be to go back a little farther. Or you could edit the code to replace all those with the newer names in Teensyduino's kinetis.h file.

I would *not* recommend pestering the FastLED developers for help. Daniel and Mark recently put FastLED on hold, following a death in Daniel's family. This just isn't a good time to hit them up with questions, especially about old hardware they decided to no longer support.
 
Last edited:
@markonian...

The AdaFruit thing looks promising... example file complied OK for 3.0 so I guess I need to try hooking it up and having a go...


@Paul: Thanks for the info. Just deciphering your message I learned about ctags and C++ templates.

Out of curiosity... if I were to try to install Ardiuno 1.0.6 how do I add Teensyduino to it?
 
The AdaFruit thing looks promising... example file complied OK for 3.0 so I guess I need to try hooking it up and having a go...

The fact that you it compiled is a good sign. Which version of Arduino IDE / Teensyduino are you using for this?

Also, how are the LEDs being powered and what voltage? I ask this because a bit more nuance exists if driving 5v LEDs from the 3.3v Teensy 3.0. I.e., is a level-shifter needed or does it work well enough without it? In a hurry? Try it without level-shifting first.

I took another look at the Adafruit library source. The LDP6803s use a "clocked" protocol which allows a driver library to be simpler than if it were "clockless". The library uses a bit-banging approach to controlling the clock and data signals and uses Timer1 for timing. Again, try it. It looks like it might just work or be very close.
 
Oh sh*t... totally forgot about signal voltage.... got all caught up on the software side.

Thanks for the reminder
 
Neither the Teensy 2.0 or 3.0 seem to work with the LED string and the example code from the Adafruit library.

I see the main loop LedOut() sends a clock and data for each cycle but I have no clue how timer1 / interrupt stuff works...

Anything I should try before admitting defeat?
 
Neither the Teensy 2.0 or 3.0 seem to work with the LED string and the example code from the Adafruit library.

I see the main loop LedOut() sends a clock and data for each cycle but I have no clue how timer1 / interrupt stuff works...

Anything I should try before admitting defeat?

Yes.

Let us see your circuit or at least give us the exact details of how everything is connected.

Are you using the example sketch titled "strandtest"? Have you modified it, for example, to change pin assignments?

What is the normal operating voltage of your LED strip?

It's way too early to admit defeat ;) As long as we have more ideas to try. I have to assume that the Adafruit library and example works on Arduino hardware if connected correctly. Code-wise, Teensyduino does a pretty good job of emulating the Arduino environment. There are a few things to be aware of when coding for Teensy 3 vs Arduino, but first...

I suggest we start with double-checking the basic details. I want to verify that your circuit and sketch look like they aught to work. And that we're both talking about the same code and circuit.

I'm able to find the LPD6803 Datasheet online but I don't know any more details of your LED strips. Any chance you have a link to them to share?
 
Last edited:
Thanks for taking the time:
Here's the wiring reference I found for the string... the one I have matches the third example.

http://www.doityourselfchristmas.com/wiki/index.php?title=Pixel_Wiring_Colors#LPD6803

The hot/ground is both obvious and confirmed in the lights working and I've tried switching data/clock just in case.

I've tried pins 0,1 and 2,3 -- mostly 2,3 so I don't have to remember to alter the code.

I am trying the strandtest code unaltered... when on 2,3 as it looked like it should work to me.
LED_strip_t2.png

I'm compiling code for no USB and that's a T2 to avoid the voltage issue.
 
Last edited:
Sorry.. the code needs to be altered for the number of LEDs and I've forgotten to do that on a number of tests but I think it shouldn't matter... it should still show the color-wipes and rainbows on the 15 LEDs I do have connected.
 
Status
Not open for further replies.
Back
Top