atmega16 3x3 rgb matrix

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey

I have a 3x3 rgb matrix with common anode and I want to control each individual led in it using pwm. Which would be the easiest way of doing that using the atmega16?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You’re probably not the first person wanting to do this, so have you done some Googling to get some ideas?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did look around a bit. I found this: https://github.com/elcojacobs/Sh... the problem is that I am using codevisionavr and that library is written for arduino. I am thinking that since I only have a 3x3 matrix maybe I could somehow use the 2 hardware pwm pins?

Last Edited: Sat. Jan 13, 2018 - 11:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Replace the 3 x 3 LEDs with WS2812 Integrated Light Source modules (or NeoPixels in Adafruit parlance).  Nine WS2812 modules will cost a few dollars on eBay.  

Link here for a purchase of bulk WS2812 modules:https://www.ebay.com/itm/50-1000...

 

Now you can program the color and level of each of the 3 x 3 LED modules using a single line out pin on the ATmega16.  See the Adafruit NeoPixel library for source code for using assembler embedded into C++ for internal clock speed of the Mega16, which is 8 MHz, I believe.

This is the fastest and most efficient way to control the color and intensity of 9 RGB LED modules with an ATMega16.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use these:

http://www.ti.com/lit/ds/symlink...

 

Super easy to use.  There is a breakout board from adafruit as well:

https://www.adafruit.com/product...

 

Super easy to use.

Jim

 

EDIT:

@Simonetta

Thats a great deal on the Neopixels!  Gonna keep that one in mind

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

Last Edited: Sun. Jan 14, 2018 - 02:14 AM