well, i have been planning on building a Picxie2 for a long time, a 8x8 matrix of led's connected to a pic to display patterns and stuff.. but due to complexaty and bordism, i built a origional Picxie (4x4 matrix) and it is SWEET! awsome for casemod ideas! Check it out: Picxie Project, schematics + source code my version was made with 3 pieces of veroboard all the same size, first board all the anodes, second board all the cathodes and third board uC and crystal board. Heres some pics (pun not intended) and a video well worth the build, i have designed a quick PCB for it now (double sided ) so will make a few for case mod ideas, might even build a giant one for my window! great little Pic practase! BTW: vid is only 1 min long, thing has some more effects ... Pics (click for larger view) Video (5mb) - i only have limited bandwidth - so may dissapear...
So quick question - something I've always been a bit confused about - you can only light up 1 LED at a time, correct? And then you just cycle through momentarily turning on all of the leds that you want to look "on", correct? Otherwise it seems like you are limited in what you can display - I mean like for example a checkerboard pattern I would think would be impossible without cycling through the leds, correct?
Yes, it's a matrix display, so naturally it's multiplexed... Not 1 LED at a time though. For a 4x4 matrix, 4 LEDs at a time.
OK I see - you do one row or column at a time. But still - even for a 4x4 grid that will mean running the leds at 1/4 brightness - isn't that problematic?
Not really, the difference in brightness is barely visible in reality, since LEDs are so responsive, and have such a non-linear light response. The LEDs in my LED clock a few threads down are multiplexed, so are running at slightly less than 25% duty cycle, and they are still as blinding as ever. I made a big matrix message display over the summer, and the LEDs were running at less than 10% duty cycle. At that point, I had to increase the supply voltage to the LEDs. If the microcontroller stalled at any point, that'd probably knock out half the LED's as they'd end up with 100mA through each one
OK so I've been thinking about building something similar to this - but I've been having trouble deciding how to code it. I mean I really see two possible routes: 1. to actually have the entire light sequence loaded in the code. By this I mean that the code would actually call for say 0001111 to be written (giving you in a 4x4 grid one entire row/column lit up), instead of calling for a variable to be written. This is certainly the easiest way. But I also really don't like it. Just seems like an inefficient use of space. It would, OTOH, be fairly efficient clock-cycle wise. 2. To have a bit of code that loads the sequence row by row (or column by column - whatever flops your mop) - from either elsewhere in the flash (this would be more efficient as only the sequence would be there, no commands or anything else), or another source such as the internal eeprom or an external source even. This method I would see as being probabaly twice or more efficient codespace-wise then route 1, but it would also take more clock cycles. I should think that even with this added inefficiency it would be able to run fast enough to refresh at least 1 8x8 array. I took a look at the source code that bigal linked to - and it looked to me like route 1 was taken (though I could be wrong - I am an AVR man myself so I'm not the greatest at reading PIC assembly code). So, well - any thoughts?
the guy who did the 4x4 matrix here has also designed a 8x8 one, but it only has very limited storage capacity. I think he ran into the problem you are describing here. Maby if you built the 8x8 version you should use a EEPROM to hold the patterns or just a bigger PIC.
just to ask, how could one go about using this for higher power systems, like groups of LED's, would one need 4 PNP and 4 NPN transistors on the 8 lines from the pic?
BUMP! Is this correct? 4 PNP transistors on the feeds to the LEDs using lower value resistors on the bases and one 150R resistor on the feed to all the collectors. 4 NPN transistors on the cathodes with what resistors on the bases?