Feb 7, 2015

8x8 RGB Matrix Booster Pack in Tiva Launchpad

Like i promise, almost in the end of the week, here is another post. In four months ago i bought this booster pack from tindie and i forgot to read that the board didn't come with components, dammit!. I need to buy all the components from ebay.com because there's no store to buy SMD components here where i live, i start to buy and after two long months, all components arrived from our Chinese friends. I also forgot to read that besides the components, there isn't library for use this on Tiva launchpad, but reading the code, is very simple to port to other uControllers. I re-write the code from RobG that is for msp430, and i added in the github to use in the Tiva Launchpad. The API is very simple and the board use a TLC5947, that's PWM LED driver where you send the data through serial (SPI) of each LED(R.G.B) and a 74HC138, a demux to select the line to ground. I try to use the SPI module from Tiva but it didn't work as i expected (i didn't discovered the pattern of this TLC and i was tired to search about it) then i just convert to hardware SPI, like Robg. 
The code works sending each color of each RGB LED, in other words, to write one line you use 24 chars of memory because of this, remember to declare const the data that will be write in the matrix, if not you can overload the heap of the uC. To write in all the matrix, you need to call this function:
 bool SendSSITLC(unsigned char *matrix_t, uint16_t offset,uint16_t limit);
eight times passing a char vector of colors an offset in this vector if you need sure, and the limit of this vector. In the main.c example you will see the Launchpad write in the matrix, but you can change easily, changing the pattern.h file. See above some photos of the matrix and the code running:

No comments:

Post a Comment