I am building a Persistence of Vision project with 120 RGB leds (=360 total lines to be controlled). We have settled on the TLC5940 for driving the LEDs (and could be open to changing this), however, now we have a problem getting the data fast enough to the LED driver chips. Currently we are using ATmega328/ATmega128-class chips which top out at 20Mhz, and we aren't able to process the data to be loaded onto the TLC5940s fast enough. Should we consider another uC? The desiderata are:
- Low cost/uC
- Low startup costs (For instance, CPLDs require a certain initial investment to get started with)
- Ideally available in a DIP package for easy prototyping
- 30+ GPIO lines (to load the LED controllers in parallel)
This question may be an intellectual poor cousin of this question, however, I think our requirements are somewhat different.
Details: why ATmega328 isn't fast enough (so far)
In the ideal world, we should be able to load the data for all LEDs in under 746uS (that's the project requirements), and again, in theory, if we bitbang at 2clocks/bit we should be able to do it in 108uS @20Mhz, however, all the bit shifting to decide what intensity to send to each LED right now gives us 1536uS load times. This is with avr-gcc
OPTLEVEL=3, all sorts of loops manually unrolled, parallel loading of all LED controllers, and every time-saving technique we can think of.