Page 1 of 1

Flowcode applied to a TLC5940 16 channel 12 bit pwm

Posted: Sun Jun 08, 2014 5:21 pm
by outlawstc
I am working on using flowcode to create a program to control a TLC5940 16 channel pwm Using a 8 bit atmega 328 micro controller
Some of the objectives in this project...
programming a 8mhz clock out of the micro controller to send to the grayscale counter of the TLC5940 - completed
programing a 512uS interrupt routine for blanking the TLC5940 as well as set up the next registry update - completed..

Things to figure out include a routine for taking 16 12bit values and distributing them into 24 byte values..
you have to send the data to the TLC5940 in a 192 bit string (16 12bit values in a row)
but with a microcontroller that only writes 8 bits at a time there is some work to do in order to distribute the 12 bits amoungst 8 bit (byte)

I know arduino strings can hold number values not just char values, im not sure how to make a byte string array for flowcode.. any examples of this will be apprciated.

Has anyone else created any code for a TLC5940?

Thanks