After wiring it all up, I realized I didn't have anything to connect this to my breadboard! So i ordered some pre-wired 8 pin connectors, and after a few hours of tinkering (mostly trying different wiring schemes mentioned in the code), I had a few blinky lights!
I'd originally encountered the "Demystifying the TLC5940" ebook and code which got me pretty close, but my row scanning setup was slightly different. A little more googling lead me to nearly exactly what i needed!
https://github.com/jblang/tlc5940demystified
This guy is using a similar shift register setup to select rows. He's using a shift register / transistor in one combo device. I'm using 74HC164 which allows you to shift out w/out the use of a latch pin, and that powers TLC59213 to source the current for the LED's. I ran the clock of the 164 to the clock of the 59213, adjusted some pins in the code and got what you see above!
Now, this is certainly progress, but its not entirely correct. First off, he's only using a Red/Green matrix, I need one more color! From what I can tell, in his wiring, he's doing R-G-R-G, etc. He's also only using 1 TLC5940. On mine, I'm doing 1-TLC5940 for each color - RRRRRRRRRRRRRRRGGGGGGGGGGGGGGGBBBBBBBBBBBBBB.. I found getting this sorted was just a matter of changing some of the math that selects the pins. A few more quick changes, and I had both his Plasma and Scoll functions working well!
I've made a fork of the above project on GitHub which can be found here:
https://github.com/billieblaze/tlc5940demystified
Next, I'll be adding some of the Adafruit GFX library functionality and integrating my button row scanning!
No comments:
Post a Comment