Pages: 1 [2]   Go Down
Author Topic: PWM over Shift Register Library (For RGB LED's)  (Read 13496 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/en/Tutorial/ShiftOut is the basic schematic.  The only difference here is the code to drive it.

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

#define __dataPin 9
#define __clockPin 10
#define __latchPin 11

A 75HC595 wires up pretty easily,  you can reference the ShiftOut tutorial here http://www.arduino.cc/en/Tutorial/ShiftOut

As for the daisy chain of the 595's....

PIN 11       SH_CP       Shift register (clock pin)
PIN 12       ST_CP       Storage register clock pin (latch pin)

are linked from one to the next, so from 11 to 11 and from 12 to 12.

The serial data is output on PIN 9       Q7" Serial Out

and PIN 14 DS       Serial data input.

So from the first 595 to the second go from pin 9 to 14 and so forth.

Here is a vid with 4 RGB's.  

I will expand to 16 and update here in a bit.


16. going 32 next


« Last Edit: November 21, 2010, 08:32:09 am by frustro » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Knob allows me to control the length and rate.
Button to change between the two.
switch to change direction.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Cubs rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great project! It is possible to run LED cube (monocolor or RGB) on this code? In cube we need multiplex layers and address rows.
Logged

Pages: 1 [2]   Go Up
Jump to: