Tuesday, March 4, 2014

Starting on some UI Bits for my Arduino project

Now that I've proof-of-concepted the Master / Slave communication between the microcontrollers, I figured I'd start in on some of the UI components.     The biggest reason I had for breaking off functionalities from the main arduino is the SparkFun RGB Button Matrix that I've been using (https://www.sparkfun.com/products/7835).    In the first iteration of my Midi Sequencer, I used this and literally a HANDFUL of shift registers to handle the RGB LED's and the button matrix.   Very tedious wiring, high parts count, lots of overhead associated with it in general.  The library I was using "ShiftMatrixPWM" is pretty damn cool, I'm not gonna lie but it ties up all sorts of other bits (timers / interrupts) and then i still had to scan the buttons.   I found that this caused instabilities in my more timing sensitive functionalities.

Initially, I was looking at the MAX7219 "Serially Interfaced, 8-Digit, LED Display Drivers" but they lacked PWM on individual LED's.  Who wants to do an RGB matrix with a limited color set?!   not me!    I kept searching and ultimately found TLC5940 "16-Channel LED Driver w/EEprom DOT Correction & Grayscale PWM Control" (http://www.ti.com/product/tlc5940).   This chip seems to do just about everything I need besides the row scanning.   It seems like I can use a few transistors to source the current required to use this chip.    I found the corresponding arduino library and some shcematics here: http://fritzing.org/projects/tlc5940-and-arduino and a few minutes later had 16 led's dancing away!

I'm planning to use an atmega328p for this particular core but might go with Attiny2313.  I don't think the ATTINY85's will have enough io to make this simple and I'd like it to be able to handle all the matrix functionality - rgb led and button matrix.    I do also like the fact that I can just scale my current setup (8x4) out to 16x4 and beyond with ease!     I'll be working on a PCB for this after I finish breadboarding the row scanning.  This guy seems to have the row scanning down, so i'll surely be referring to this alot: http://www.thebox.myzen.co.uk/Hardware/Hexome.html

I'm also starting to amass quite a bit of test sketches and conceptual code which i'll post to github soon as well!


No comments: