0
votes

I am in between a small project using Arduino Uno R3 where i have to control a 9 X 16 LED Matrix.

Before i started the project i had planned for 8 X 8 LED Matrix (solution here would work for 8X8) and i know the same solution will work if I use a Arduino Mega (with more output pins)

Can any one suggest me how to control a 9 * 16 LED Matrix with Arduino UNO

2

2 Answers

0
votes

You can drive up to 512 LEDs with some MAX7221 LED driver chips. See here for instructions.

0
votes

Another route to take would be to use multiplexers. They allow you to address many outputs (or inputs) with few arduino pins.

A setup similar to the one on the left would allow nesting of multiplexers to enable control of more LEDs. The only issue you would run into is that the LEDs may dim a little bit between being addressed.

Arduino Multiplexer

Here's an Arduino page on the topic (with sample code). http://www.arduino.cc/playground/Learning/4051

/*
 * codeexample for useing a 4051 * analog multiplexer / demultiplexer
 * by david c. and tomek n.* for k3 / malm� h�gskola
 *
 * edited by Ross R.
 */  

int r0 = 0;      //value of select pin at the 4051 (s0)
int r1 = 0;      //value of select pin at the 4051 (s1)
int r2 = 0;      //value of select pin at the 4051 (s2)
int count = 0;   //which y pin we are selecting

void setup(){

  pinMode(2, OUTPUT);    // s0
  pinMode(3, OUTPUT);    // s1
  pinMode(4, OUTPUT);    // s2
}

void loop () {

  for (count=0; count<=7; count++) {

    // select the bit  
    r0 = bitRead(count,0);    // use this with arduino 0013 (and newer versions)     
    r1 = bitRead(count,1);    // use this with arduino 0013 (and newer versions)     
    r2 = bitRead(count,2);    // use this with arduino 0013 (and newer versions)     

    //r0 = count & 0x01;      // old version of setting the bits
    //r1 = (count>>1) & 0x01;      // old version of setting the bits
    //r2 = (count>>2) & 0x01;      // old version of setting the bits

    digitalWrite(2, r0);
    digitalWrite(3, r1);
    digitalWrite(4, r2);

    //Either read or write the multiplexed pin here

  }  
}

Take a look at something like this: http://www.arduino.cc/playground/Learning/4051