![]() As you can see in the image above, the D9 pin controls the intensity of the red LED of the RGB LED. The ADC of the Arduino Uno reads the analog voltage across the wiper terminal of the potentiometers/trimmers and based on that voltage, the Arduino Uno adjusts the duty cycle of the PWM signals generated at the PWM pins D9, D10, and D11. Basically, what happens here is that we have 3 potentiometers/trimmers connected to the A0, A1, and A2 ADC channels of the Arduino Uno. They're all connected through the jumper wires that we have. We have here a common cathode RGB LED, an Arduino Uno board, 3 potentiometers/trimmers, and 3 resistors. Yeah I saw this chip recently and it seemed pretty cheap, especially considering it provides I2C.The setup is very easy. It's just so seducing lolīut anyway, I decided to refrain from buying another led matrix now just to use a MAX, I think I'll use what I have: 595's and 2803 that is the good old way.Īnother cheap chip to consider is the WS2801 with a shift register. It's cheaper from distributors as you say but I usually buy almost exclusively from ebay because I don't want to wait to make a big order and save on the shipping costs from a distributor. The cheapest ICM7218 I can find on ebay is at 9$ with shipping costs. You can get from distributors new for $4.40 & $5.11 I'm just gonna check if there's any library that supports common-anode (rows run from top to bottom and cols run from left to right)Įven if we rotate by 90 degrees the resulting image will be the mirror of the desired one.yep it's gonna take some software fiddling which I'm not willing to do (I love programming but I'm currently working on other projects), I prefer to buy another led matrix. ROW1,2,3,4 = H, H, L, L (the COLS from above)ĬOL1,2,3,4 = L, H, H, H (the ROWS from above)Īnd this will result in lighting leds If we do the swapping the way I suggested, for the common-anode it will be: To be more specific, if we want to switch the two leftmost leds in the upper row, then for the common-cathode it's it's hard to imagine that only I discovered that MAX7219 works with common-anode while everywhere is written specifically "common-cathode" it's hard to imagine the professionals would design it in such an inefficient way And what works for one LED works for any other, so the two matrices are identical.nope! That would work if only one LED is lit at a time, which I'm sure is not the case, without even having to refer to the datasheet, because In my simple example, everything seemed to be fine. ![]() That's a good question, HOW does MAX7219 does the multiplexing? It would be easy to write a sketch to turn on 1 segment at a time, one register at a time, to see where things ended up. If you ran in no-decode mode and defined your fonts you'd be okay, otherwise things could rotated 90 degrees, or maybe flipped somehow, from what you are expecting. ![]() However, if the MAX7219 multiplexes by driving current into one Digit line and sinking current into 1 Segment line at a time, then electrically you would be okay. (EDIT some 4066 bilateral switches could take care of that, although not in the most efficient way perhaps)īack to the main point though, it seems you agree that a MAX7219 will work with common-anode led matrix just as well? I haven't looked in the datasheets if they have such capability, my first though is to switch them on/off alternatively fast enough to get the colors multiplex.but that sounds like a punishment to the chip lolĪ better solution would be to use one MAX7219 and connect the anodes (for common-cathode) or cathodes (for common-anode) of each color maxtrix alternatively to it, by using an arrangement of transistor and logic gates that acts as a SPDT switch. ![]() Yep you got a point there, because each color matrix will share either the column or the rows with the other.which in turn are driven by separate MAX7219, so this will need a scheme to multiplex the 7219s. I think if you have 2 MAX7219 trying to drive a 16x8 matrix (2 color) or 3 driving a 24x8 matrix (RGB) there would be a lot of interference between chips as they each try and drive the anodes or the common cathodes for their own 800 Hz multiplexing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |