Home » Electronics, Featured, Headline, Things I've Made

How to Build a 8×8 RGB LED Matrix with PWM using an Arduino

14 May 2009 78 Comments
How to Build a 8×8 RGB LED Matrix with PWM using an Arduino

A while ago I designed a circuit that would power an 8×8 RGB LED Matrix (192 LEDs in all) using only 3 pins from an Arduino Diecimila and supporting Pulse Width Modulation. I’ve uploaded some videos of this project on Youtube and folks have been emailing me with questions on how it works. In this post I’ll try to answer all those questions so you can build your own.

I started with the LED Matrix component itself. I used an RGB 8×8 common anode matrix from LedSee (only $10 on ebay). The matrix takes 32 pins: 8 anodes, 8 cathodes for Red, 8 for Green and 8 for Blue. Then I had an arduino Diecimila which was about $25 I think but you can use any ATMega based board.

A little googling revealed that a thing called a Shift Register could help me drive all those 32 pins using just a couple from the arduino. Shift Registers are cheap and easy to source. I used the 74HC595 IC.

The arduino website has a tutorial on Shift Registers which can be found here: http://www.arduino.cc/en/Tutorial/ShiftOut. This explains what they are, how they work, the clock, latch and data pins as well as how to chain them together.

After a few evenings of experimentation I knew I could drive 8 pins per 74HC595 chip. If I chained enough together I could drive all 32 pins. So I was set.

breadboard prototypeNext I drew up the schematic on paper. I played with a few prototypes using Breadboard until I had confidence that the circuit would work. This was a smart move as it turned out there was a problem. I found through experimentation that the Red LEDs were overpowering the Green and the Blue. I couldn’t figure it out since the code treated them all as equals. I went back to the reference manual for the LED matrix and found that the operating voltage of the RED LEDs in the matrix is actually lower than the Blue or Green.

I was able to even them out by introducing a higher resistor (330) into the RED cathodes than is in line with the blue and green (220 ohms). That was a true moment of enlightenment.

There’s a lot of wires so I put it into Visio. Here’s the result:

The blue, green and yellow lines go to the Arduino.

Next up I worked on the code. Besides turning the LEDs on and off I wanted to actually get different colors. I had no idea how to do this but it turned out Robert aka “MadWorm” had already figured it out: [LINK]. My code is essentially based entirely off of Robert’s so I won’t complicate or confuse you with my own extensions.

To better understand the ISR business, I’ll refer you this time to ucHobby [LINK]

The arduino supports an interrupt which is essentially a routine that runs in the the background, almost like a separate thread, from your code. This interrupt is what updates the Matrix pins and it happens very very fast. Even better is that it frees up the main loop of your Arduino sketch to do the interesting stuff like update the actual matrix data.

Pulse Width Modulation or PWM is essentially a way of simulating an analog output from a binary source. Huh? Wha?

If I turn on a Red LED I get red, if I turn on a Blue LED I get blue. If I turn them on both at the same time I get purple. What if I want to get some color in between? with this type of system you can’t get anything but 7 colors (R, G, B, RG, RB, GB, RGB). The only way is to turn on the LEDs partially. But an LED can only be fully on or fully off, how can you get a “partial” LED? The answer is PWM.

Pulse Width Modulation varies the time for which an LED is active. It’s still either fully on or fully off during that time, but if you think of that time as a wave, the “width” of the “pulse” during which the LED is active varies. Here’s a good visual:


The result is an ability to “mix” colors by different degrees and get a far wider range than the 7 possible combinations of RGB. The good news is this is all implemented within Robert’s ISR code above.

So I soldered away busily for three nights and in the end I had a nice little circuit board. Definitely not as small as it could be but good enough for a RevA.

At this point I had everything working nicely so I built simple case of Cherry/Lexan and four hex-head bolts to finish up.

That’s basically it! You can checkout the pictures below or find the video on Youtube. I had a lot of fun making this thing. It sits proudly on my desk today and although many have tried, no one can resist asking “what is that thing”.The PWM is very tough to videotape but take a peek at the pics. Here’s my daughter playing with the prototype:


  • Interactivity Ideas « said:

    […] More information here>> […]

  • Suunnittelua ja osien hankintaa | limint.net said:

    […] selvittelemään mitä kaikkea tarvitsisin ja mitä osat tulisivat maksamaan. Franciss Hanahanin blogista löysin ohjeet kuinka tehdä rgb led matriisille ohjain. Ohjaimena käytetään Arduino […]

  • Fiules said:

    Hi Francis, i was wondering, it wasn’t necessary an external boost power supply for the leds, like transistors? or just with the arduino

  • Francis (author) said:

    Good question. I multi-plexed them so there’s only 1 on at a given time. It’s so fast the eye can’t tell. Otherwise yes I would’ve had to boost the power with some transistors.

  • Lauri said:

    Can you explain what code did you use. I think that Robert’s code is for Arduino, is it? What code is used in Proseccing to control the Arduino?

  • Scott said:

    I don’t understand how an 8×8 matrix equals 192 LEDs. Last I checked 8×8 was 64.

  • Francis (author) said:

    Simple @Scott. RGB LEDs have 3 anodes and one cathode (or vice versa). They act like 3 LEDs in one.
    8 x 8 x 3 = 192

  • Francis (author) said:

    @Lauri : You’re right, Rob’s code is for the arduino. For Processing I wrote a simple app based on the example serial port code on the Processing 1.0 site. This works nicely with similar code found on the Arduino.cc website. There’s really nothing to it and I’d encourage you to check the examples which are very clear on the respective websites. Hope that helps.

  • luke said:

    hi there

    i m doing a interactive project which need things like this
    would you pls show me the arduino code?
    i used to made a 8×8 sing color leds panel, but i don’t know how to make another one in the scanning way.

    will be very appreciate!


  • Fiules said:

    Hello again Francis
    Wich pins of the arduino did you use to connect the data, clock and latch from the 74hc595?
    That’s all, thanks

  • Robotjam said:

    Hi, I am in the process of building this project , got all the parts ordered from ebay and plan to have this working in about 2 weeks. But i see one problem that doesent make sense. In the schematic you have posted you show one shift register controlling only the green leds, another controlling the red, and another controlling the blue leds. Even the resistors are laid out the same way , the problem is that the 8×8 matrix ‘s are not laid out that way, at least the ones i have found or even the one you say you used in the project description, won’t the circuit need to be completely redesigned or am i missing something here?

  • Francis (author) said:

    @Robotjam; I’m not sure what LED matrix you’re using, mine was laid out as is drawn in the schematic. The shift registers were chained together, I used 4, one for Red, Green, Blue and a fourth for the anodes (it was a common anode display). The schematic is correct and you can check the arduino.cc forums as a group of folks have made an Eagle sketch with really nice PCBs based on it. Hope that helps,

  • Robotjam said:

    Not really but thanks anyway

  • Francis (author) said:

    @Robotjam, could you post the link to the datasheet of the LED matrix you’re using? I’ll try to dig up same from the one I used.

  • Francis (author) said:

    Looks like LedSee is no longer selling them but there are a couple of other suppliers on ebay. I used one like this:


    The datasheet shows the internal wiring but you can see from the photo the pins are arranged to match what I have in the schematic. Hope that helps,

  • Robotjam said:

    Here is a link to the exact one i bought on ebay, sorry it is so long.
    Looks exactly like the one you just posted.


    If its the same as yours what am i not understanding?

  • Francis (author) said:

    @Robotjam – You tell me 😉 What made you originally think the circuit needs to be redesigned? I think looking at the diagram that the pin layout is the same as mine, the number in the circle refers to the pin, notice 17,18,19,20 then skips 8 (green) and jumps to 29, 30 etc. Using that diagram you can figure out which pins light which leds but you can easily test it when you get it, wire up a cathode and an anode and see which LED lights up.

  • Robotjam said:

    It is that your layout board has a separate red section, separate green section and a separate blue section. It was my understanding that the pin layout of these things is R/G/B, R/G/B, R/G/B not R/R/R/…, G/G/G/…, B/B/B… Does that help you understand what i am not understanding?

  • Francis (author) said:

    Got it. So that’s incorrect, the pin layout is as per the datasheet on the page you linked to, pins 1-8 map to cathodes for blue, pins 9-16 map to cathodes for red, 17-20 map to anodes, 21-28 map to cathodes for green, 29-32 are anodes. Hope that helps,

  • Robotjam said:

    Yes it does, Thank you, sorry for taking up your time like that

  • Fiules said:

    hello francis
    I made this with independent leds in order to do a rgb table. I already tested it and it works!, but the animations are limited, i not able to see the smile or the explode, only the rainbow, and the disco lights, there is something that i have to do on the code to activate them? i don’t think that i had bad connections cause i’m able to see some animations and all the leds are working. Another thing, reading your issue about the resistor, a funny thing happens to me. I have 68 ohms for blue, 100 ohms for red and 120 ohms for red. The green and blue are ruling in the matrix, you can barely notice the red color. But if i put the values that you used, the red color is going to be with more intensity difference, i’m confussed. sorry about the english.
    Thanks for your help,

  • Robotjam said:

    Hello Francis, I was wondering what power supply you would recommend, also in a privious post someone mentions the program called Processing. do I (we) need that to get this programmed or will the Arduino program be sufficiant. And lastly (sorry to ask so many questions) I am planning on giving a couple of these things out as Christmas ornaments so in order to keep cost and size down would a Really Bare Bones Board (RBBB) http://www.moderndevice.com/products/rbbb-kit
    work instead of a larger and more expensive Arduino board?
    Thank you for your help, this project is awesome.

  • FCsabi said:

    How many LEDs can you control this way? 8×8/8×16/16×16/16×24/24×24/24×32/32×32 Which is the limit? Or maybe I could control more if I use more shift registers?

  • Francis (author) said:

    @FCsabi – well you get 8 pins per shift register but at some point you’ll run out of Hz and things will slow down (need a faster PIC or multiple in parallel).

  • FCsabi said:

    Your schematic shows that you need only 3 pins from the Arduino to drive 64 LEDs.If I multiply this by 4 I get 12 digital pins to use (64×4 = 256 LEDs).I think the Arduino Duemilanove has more than 12 pins.
    Am I wrong?
    Thanks for the reply for my other message :)

  • Francis (author) said:

    @FCsabi – The pins are the data, clock and latch for the shift registers, 3 pins total. The output of the shift registers is what drives the LEDs and there are 192 in total. 8×8 red, 8×8 green and 8×8 blue. Each arranged in an 8×8 grid.

    The LEDs are multiplexed in the matrix and they share a common cathode to 8 Red anodes, 8 Green anodes, 8 Blue anodes and 8 cathodes, hence 4 registers.

  • FCsabi said:

    Thanks for answering my questions.
    Now I understand it.The problem is I wanted to make an RGB LED display that shows realtime image from a computer with at least 16×16 resolution or more if possible.The programming is quite easy , I programmed a lot in C++ and C# before.I could buy RGB LEDs from online stores that are the same like yours.The ones that have 3 cathodes for each color and 1 anode.I could build myself the RGB matrix using some tutorials and your schematic to control all of them and its PWM. If there is a way to control more RGB LEDs using the Arduino, please tell me. It would be impossible for me to make a led screen using only 8×8 grid matrixes and an Arduino to control each one.:(
    If I manage to finnish my project you will be included in the credits. ;).

  • Francis said:

    @FCsabi – 16×16 is a lot of LEDs. for RGB that’s 768 total and you may run out of clock speed to multiplex these all fast enough, but might be possible, give it a try I guess.

    I know folks have done what you’re talking about and you can find a lot of videos of same on Youtube but most use different PICs than the Atmega.

    You might also consider an LCD display, which has higher resolution, smaller form factor and you can find ready-made boards on Sparkfun. These are way smaller (usually 1.5″ square) than this thing though.

    Sounds like a fun project, good luck with it, and post back a link when you get done building!

  • Matt Organ said:

    Francis, that is nice work there. I am going to implement some of these ideas for a college project. I am hoping to output to my own array of RGB LEDs. Do you know how to implement this. Is it so that say all the red legs on the different rows are joined together in the same why its done on multiplexing?

  • Francis (author) said:

    @Matt, thanks! I’m a novice so I might get this wrong but basically multiplexing is basically setting some pins high and others low so you end up with a single LED lit at a given time. By this means you can isolate a single LED in the matrix and turn it on, even though it’s connected to it’s neighbours. Do it fast enough and you end up with what looks like two or more LEDs on at the same time. There are some good tuts on the interweb that explain it pretty well if you go looking. Hope that helps.

  • Alex said:

    Hi Francis,

    Firstly thanks for posting this project of yours and explaining it to us all :)

    I’m hoping you might be able to help me understand the 74HC595 chip a little bit more. As per your diagram, you have 1 x 595 for the LEDs positive (chip #2) and 3 x 595 for the 3 LEDs negative.

    My question is, how does the 595 chip know where to send the positive signal? Wouldn’t all the 595 chips send positive signals and therefore there is no ground so none of the LEDs would light? Am I missing something?


  • Alex said:

    I’ll also add that I thought you needed a darlington chip like shown here: http://tinkerlog.com/2008/08/31/led-matrix-projector/

  • Robert Cole said:

    Using the MadWorm script, I had to make the Anodes the first register, followed by the blue, the green, the red. Things left out in your schematic was the last register back to pin 12 as an input. The only one I can’t figure out still is the display enable in Pin 9??? It looks as if the Second ground was supposed to go to pin 9, but it works without the display enable pin. Weird.

  • Justin Shaw said:

    Hey, thanks for posting. Well done; I like the color coded schematic!


  • Aurel said:

    Can you give me an exemple of your code used to control the matrix?

  • pau said:


    I’ve reading your project and there is a thing I don’t understand: If you turn on the leds one by one, why are you using registers? To set the on and off of each led? (I say that because i think that you can’t store a pwn signal in a register). But the problem is that you can’t use registers to control a single led because anodes are common for 8 leds so I’m stuck here.

    I apologize for my English if I’ve said something wrong, the fact is that it’s not the language of my country.

    Thank you!

  • Diego Aguilera said:

    I am working on an art project. I am using a camera to convert video to a 8×8 pixel matrix using processing. I want to use an 8×8 led matrix to mirror what the camera grabs. I am short on time and was hoping you could share the Arduino code. Or share how to address the matrix. Thanks.

  • Francis (author) said:

    @Diego – the code is already linked from the article. Here’s the direct link in case you missed it:


  • Sean O'Swaggerhan said:

    I built a matrix like this using only red. but it was 16X16, and rand with a refresh rate of 60hz. I wanted to do someting like this, but realized the shifties are only either on or off. I couldnt figure out how you could dim the LEDs. Now I can see that if you were to run it at 600Hz (ten times the speed), and have the led on for a portion of time and off for another, you could get 10 stages of brightness, but i didnt think the arduino could handle that speed and amount of information. Am I right in my assumption of how this works? How did you do it?

  • Lavan said:

    Hi Francis,

    Cool product. I have trying to reproduce your model but without the Arduino board (I’m using my own Atmega168 with 4 595’s) and have done all the connections and coding. But I’m not getting distinct red or blue or green colors. Maybe i’m doing something wrong while doing the SPI transfer. Can you let me know what you have done for the SPI transfer function.


  • Kasula said:

    I noticed in the madworm code that he’s using the display_enable pin 9 (in arduino, which is PB1 pin on Atmega168/328 MCU) for PWM output. Which output pin of the shift register is this PB1 pin connected to? The way I understand it is arduino digital pins 10,11,13 (PB2, PB3, PB5 pins on Atmega168/328 MCU) are being used for SPI transfer as shown in your schematic. But I don’t see any PWM output pin connection.

  • Francis (author) said:

    @Kasula, the display_enable pin is not necessary on the arduino. The arduino outputs a clock, data and latch pin to the shift registers. The registers know nothing of SPI or the like.

    My interrupt looks like this:

    ISR(TIMER1_OVF_vect) {
    TCNT1 = __TIMER1_MAX - __TIMER1_CNT;
    byte cycle;

    for(cycle = 0; cycle < __max_brightness; cycle++) {
    byte led;
    byte row = B00000000; // row: current source. on when (1)
    byte red; // current sinker when on (0)
    byte green; // current sinker when on (0)
    byte blue; // current sinker when on (0)

    for(row = 0; row <= __max_row; row++) {

    red = B11111111; // off
    green = B11111111; // off
    blue = B11111111; // off

    for(led = 0; led <= __max_led; led++) {
    if(cycle < brightness_red[row][led]) {
    red &= ~(1 << led);
    if(cycle < brightness_green[row][led]) { green &= ~(1 << led); } if(cycle < brightness_blue[row][led]) { blue &= ~(1 << led); } } digitalWrite(__spi_latch,LOW); spi_transfer(red); spi_transfer(blue); spi_transfer(B00000001<

  • Tank said:

    Hi Francis,

    would this codes till work for separate RGB leds (not a prebuitl matrix) and how could it be used with common cathode LEDs? Thanks!

  • Francis (author) said:

    @Tank: yes definitely. That’s all an LED matrix is at heart. If you get the datasheet for the led matrix I’ve used it shows the matrix internals and you could replicate it with individual LEDs on a board yourself. Code doesn’t need to change.

  • Awangahad said:

    Hi Francis

    I have a college project for LED panel. I’m a total new on this one but do understand a little how it works. I’ll be using a Flexible LED strip of SMD5050 RGB LED. They are in a unit of 3 per cutlet which has a resistor for each LED. I am making a 10×10 LED panel.
    Do you think the program codes will work for the idea here.

  • Francis (author) said:

    Hard to say. I’m not familiar with SMD5050, assuming the LEDs are common cathode and individually addressable the code could be adapted. If they are RGB you’ll run out of shift register pins. 8x8x3 = 192, 10x10x3 = 300

    Good luck and send me a picture when you’re done.

  • Justin said:

    Hey Francis, Im currently working on my 3rd led matrix controller board, using your schematic and MadWorm’s code, and it sorta works, just need to fix some shorts.
    The ISR code you posted has some weird syntaxis, like blue &= ~(1< }. Can you verify that? I'd like to see the exact same patterns as you have in the video! Thanks again, and I will post my results as i am done!

  • Francis (author) said:

    Hi Justin. There was a typo introduced by pasting into wordpress. I’ve fixed it. Tilde (~) is a bit-wise NOT operation. The << means shift left. So ~(1 << red) would shift 1 left “red” positions, effectively multiplying it by 2 (to multiply by 2 in binary you shift left) “red” number of times. Then ~ NOTs this, effectively turning the 1s to 0s. Hope that helps.


  • Awangahad said:

    Hi Francis
    Just got my Arduino Duemilanove compatible. Unfortunately the SMD5050 RGB LED has shared anode of 12V. Do you think there’s another way of connecting it at all. If power up from the Arduino board its a 5V.
    Thanks again.

  • Francis (author) said:

    @Awangahad you can use definitely power a 12V component but not through the arduino since it’s only 5V: Use a transistor as a switch to control a 12V source and the Arduino to control the transistor. Make sense?

  • Aija said:

    Do you think this project will work with an Arduino UNO? I’m a novice trying to create a drawing program in Processing that sends output to Arduino to control an 8×8 led matrix. I’m thinking about buying this matrix:


  • Francis (author) said:

    Should work no problem!

  • Mattias said:


    Thanks for the great guide. I just have a few questions though. As you are multiplexing all the leds, do they flicker noticeable then and is the intensity much lower than it would be if not multiplexing?

  • Francis (author) said:

    Probably a bit less intense but there is no noticeable flicker. Then again, without multiplexing I could not power this number of LEDs with only 3 pins and 5volts.

  • steve said:

    Hi, I am not good at ordering different types of LEDs–there are so many kinds!
    Can you tell me a digikey part number or type of LED to search for that I would need to get if I build this with separate LEDs instead of an 8 x 8 matrix?


  • dre dre said:

    sir if i will be making 20×6 rgb matrix,and make a similar project like this, what components should i use to make it work?

  • Francis (author) said:

    Bit of a broad question. If you can find a matrix that shape (20×6) then choose that, I’ve only seen square 8×8 matrices. Alternatively you could buy a bag of RGB LEDs, they are fairly cheap and sold by the hundred, then just make your own matrix. A word of warning if you go this route, it’s a LOT of soldering and your best bet would be to make a double-sided PCB board to keep the wiring nice and clean. Not a trivial task. Alternatively you could just order a kit from somewhere like Sparkfun or LadyAda. Hope that helps.


  • Francis (author) said:

    This is basically what you want http://www.sparkfun.com/products/105 but you can order them in bags of 100 or more off suppliers on Ebay in China for MUCH cheaper than the price listed here on Sparkfun. Hope that helps,

  • mistermax said:

    Do you happen to know what the component model for the RGB matrix was? I’ve got a couple of xsm-d1088BRG modules and am trying to identify if they are RGB or purely red/green.


  • adam said:

    hi! i try to transfer from pc with processing frame data to display but i have experienced some weird action. i read after that and it turned out that the serial uses interrupt process too. so it can cause some missing bytes in the data flow.
    for example i send an byte array [1,3,5,7,9,11,13,15] and the arduino gets this: [1,3,5,9,11,13,15,15]
    dont you have experienced something like this (missing data)?

  • kd5und said:

    Hey Francis,

    This is an awesome project….
    I am on a similar mission, I’m trying to multiplex 24 rgb leds for an old muscle car project. There are some trim pieces on this car that im going to drill holes in and epoxy 12rgb leds each in the 2 rear trim pieces and sand them flush. Id like set them to scroll when the turn signal is applied and stay on for brake signal and dimm for running lights. I got the rgb leds cause later id like to program rainbow effects and simular things while at car shows.
    111 111111122222
    123456789012 345678901234

    That is the real world layout of the leds above
    but i think your matrix code would work fine for this
    and just build code for a 5×5 matrix and just dont do anything with the 25th led. i curently have a picaxe 28×2 that im trying to use and some 595’s. I have limited programing skill but i did do some basic in middle school about 15yrs ago. im thinking about getting an arduino setup but i know nothing about C language, so i was thinking i would start off by duplicating your project part by part and hopfuly wittle it down to what i need.

    any thoughts?


  • kd5und said:

    What is the interface that your daughter is using to make the patterns in the video?

  • Francis (author) said:

    It’s a simple app I wrote in Processing, works well with the Arduino serial interface.

  • Francis (author) said:

    Sounds like a plan, go for it!

  • Gustavo Valença said:

    Hello Francis, I am a layman in the subject but you get the idea how the system works. I am wanting to set up a curtain of RGB LEDs with 30 rows by 50 columns to display graphics and do not know how to begin. I already have where to buy RGB LEDs for a good price and mega2560 Arduino board (I saw that she possesses more channels). I would like you to pass, if possible, the material needed to build this project and an outline of how to mount the LEDs. Ex: What resistors to use, what types of LEDs (common anode or common cathode), how to connect the LEDs, such as multiplex, if I need more than an arduino mega2560. It is an audacious project well and not only wish, as I need your help to put it into practice. I thank the understanding and attention, thank you.

  • EZBSVS said:

    Hey Francis! Just wanted to thank you for posting such a great tutorial. I’m looking to do a project with RGB LEDs and this certainly has helped put me on the right track in my research.

    I do, however, have one question: do you have any insight into linking multiple sets of these circuits together? I am looking to wire up 8 of these arrays, do you think it would be possible to just daisy chain all the shift registers? Or would a set up of one shift register branching to the 8 individual circuits be more efficient?

    Thank you in advance for any insight or advice you can provide. I greatly appreciate it!

  • Jonathan Schemoul said:


    From what I’ve seen, using those IC to drive a matrix results in low brightness. (even if cheap control circuit of course :)).

    I’d recommend going with MIC5891 on the anodes and MAX6969/MAX6968 (just shift register with constent current) or TLC5947 for the cathodes. This has the advantage of nt using so much resistor and having a fine control on the amount of current that is passing.

    Also, for the Tlc5947, it has the advantage of built in 12bit pwm for exactly 24 channels, resulting in just one IC for your whole matrix cathodes, with integrated PWM so no need for a software one.


  • fellow programmer said:

    thats awesome! you know… you could use 3 MAX7219 matrix drivers instead of 4 shift registers… you would get the same result and you would only need 3 resistors, 6 capacitors, and 5 pins on the arduino (including power and ground)

  • michael said:

    hi francis,

    im new to this arduino products, or even led things, but i wanted to start a project on my own pub signage, or even start a company on signage designing, i was CS graduated but havent touched programming for more than 2 decades already…, can u tell me whether a arduino UNO is sufficient for this project? or wat else do i need to start off??


    Michael (my first day abt led n arduino)

  • FreeTexan said:

    You introduced “a higher resistor (330) into the RED cathodes than is in line with the blue and green (220 ohms). That was a true moment of enlightenment.”

    Shouldn’t that be a true moment of endarkenment? LOL

  • tocandar said:


    I’m new to arduino and its project is 5 stars.
    can send the code by email please


  • Jesse said:

    Wait, how do you do PWM with a shift register on arduino? I’m a newbi… Any help?

  • TSP said:

    I’m also curious how PWM works with shift registers like this; is the PWM done on the latch pins? or is it more of a software PWM where data is just sent through the registers so that you can have PWM on individual pins?

  • Borillion said:

    I know this is old, does anyone mind explaining the need of the 4th shift register on the anodes? Not seeing the point of this. Isn’t switching power over the RGB cathodes enough?

    Sounds to me it technically doesn’t matter if they are always connected to a common ground if your not proving an electron source from the register pin, your only disconnecting ground from an entire row of the red, blue and green led’s.

  • Ivar said:

    If I want to build my own 8×8 matrix using RGB Leds, would I need common anode or common cathode LED´s?

    I saw in one of the comments a question about the same thing, were you said common cathode Led´s to be used for the matrix. I’ve bought a bag with 100 psc. Common Anode RGB led´s.
    Could I build the matrix using the same schematic shown above with the Common Anode Led´s?



  • Francis (author) said:

    I don’t see why not. Give it a shot!

  • jean-charles said:

    Hi Francis. Could you send me your arduino code because i use thé samedi schematics as yours and the third register is uses for rows. I don t found any sample of code.

    Thanx in advance.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.