Heres the lib I've been working on for a couple of months now (Well... more like a bunch of functions, but I'm working on incorporating it into a class and eventually its own library ).
These are a bunch of functions (and a framework) for using PWM over Shift Registers (specificly 74HC595's). The library us used for just general RGB LED's, as that is what it is specifacly set up for. It wouldent take much code, though, to make it work for general PWM tho ;D. In fact, I'm working on adding this functionality to the library now...
That's awesome. I have a couple of PCBs I'm selling on my website (www.logos-electro.com) that use daisy-chained 595s to drive high current outputs. Would you mind if I linked to your code once it's up?
That's awesome. I have a couple of PCBs I'm selling on my website (www.logos-electro.com) that use daisy-chained 595s to drive high current outputs. Would you mind if I linked to your code once it's up?
Yea, sure you can. I am working on integrating the code into another one of my projects (which I may or may not make open source), so in the future it /may/ not be open to the public (probably will stay open tho ;D ). I would love to help you with your project. The code it set up so its not very hard to make it work for just about any PWM (or just basic HIGH/LOW) output to 595's.
Hmm I'm working on some home automation project (lots of PWM controlled LED's included, more than my arduino mega can handle) so I think this is what i'm looking for BUT i never worked with a shift register. I know i can get myself to the point to understand them but a shematic and a sample code would be really awesome. insertbegemotehere-> :
I've have a read through and think I see whats going on but would like to be sure.
I'd like to make use of this instead of using tlc5940s (too expensive, hard to get hold of and currently in my prototype flickering madly) but might have to squeeze a few more 74595s into it for my project. I assume the quantity that it can drive is down to the time taken to shift the data out within each interrupt ?
The 74595 can sink or drive current so you can use it with Common Anode or Cathode LEDs - you might have to reverse the on or off logic as on will be off and vice versa.
As for TLC5940s - there is an issue with the library at the moment that results in flicker, bleed over etc.. Someone posted working alternate code but I cannot find it on the forum right now. I do need to test it myself as I had stalled my project that relied on them due to this issue.
Yay! Looking at the images on your website, I was able to reconstruct the design. I have a little "flitter" after it loops through the function, I put a 103 cap on the latch pins, not sure what's happening there.
For those asking for a schematic, in his code, the PWM pins are