Propeller & TLC5940

When we began work on this project, we were planning on using an arduino at the heart. However, after some initial tests, we found that the arduino just wasn’t powerful enough to keep up with all of the processing that we wanted to do. A friend pointed us towards the propeller platform. While I wasn’t too excited to learn an entirely new platform, I agreed to give it a try, and I have been very pleased with the propeller.

I have worked with TLC5940 LED drivers on previous projects, and we were pretty set on using them to drive the LEDs on this project. So once we got the propeller up and running, the first thing we tried to do was drive some LEDs. Fortunately, someone had been down this road before and shared the code. It wasn’t long before we had LEDs dancing in all colors of the rainbow.

After spending some time with the propeller and the TLCs, we noticed a few shortcomings in the TLC library. The library only used the upper 8 bits of the available 12 bits of resolution on the TLC chips. Additionally, dot correction was not implemented. After a bit of tinkering, we were able to convince the propeller to communicate with the TLCs in full 12 bit resolution, as well as send the TLC dot correction data. We’ve posted our code on the object exchange and on github. There is still room for a lot of improvement to this library. Since there is no 12 bit data type in Spin (the propeller’s language), we used an array of 16 bit words to store the data. Obviously we could make better use of memory. Due to the multi-core nature of the propeller, I think this chip also has great potential to multiplex the outputs of the TLCs, but we’ll save that for another project.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>