Displaying an image on 5x7 led matrix without any external chip or ic.

My code looks like this:

// the images are stored as bitmaps - each bit corresponds to an LED
// a 0 indicates the LED is off, 1 is on
// When the column pin goes low and a row pin goes high, the corresponding LED will light.
byte on = {
B11111 };

const int columnPins = { 3,4,6,10,13};
const int rowPins = { 1,2,7,8,9,12,14,};
void setup()
for (int i = 0; i < 5; i++)
{ pinMode(rowPins*, OUTPUT); } // make all the LED pins outputs*

  • for (int j = 0; j < 7; j++)*
  • { pinMode(columnPins[j], OUTPUT); // make all the LED pins outputs*
  • digitalWrite(columnPins[j], HIGH); } // disconnect column pins from Ground*
    void loop() {
  • show(on); // show the on image*

// routine to show a frame of an image stored in the array pointed to by the image parameter.
void show( byte * image)

  • {*

  • for(int row = 0; row < 7; row++)*

  • {*

  • digitalWrite(rowPins[row], HIGH); // connect row to +5 volts*

  • for(int column = 0; column < 5; column++)*

  • {*

  • boolean pixel = bitRead(image[row],column);*

  • if(pixel == 1)*

  • {*

  • digitalWrite(columnPins[column], LOW); // connect column to Gnd*

  • digitalWrite(rowPins[row], HIGH); // disconnect LEDs*

  • }*

  • delayMicroseconds(300); // a small delay for each LED*

  • digitalWrite(columnPins[column], HIGH); // disconnect column from Gnd*

  • }*

  • }*

  • }*
    The output on my matrix is just surprising and causing a lot of confusion within.
    The 4th and 7th row leds are all lit. Why this is hapenning? PLease help

Don't you need "digitalWrite(rowPins[row], LOW); " somewhere in there?

At the moment all your row pins are permanently HIGH. That won't work...

hi, i'm also trying out a led matrix without "Chip's help" !
i probably should've tried this way first, but i'm following the Earthshine tutorial so i've already rigged up my breadboard with shift registers... now i don't know where the "pull to ground" occurs !

anyway, for your case, i would suggest a simple sketch to light up ONE led first, just to confirm your pins are connected properly.

so i'd suggest something like;

digitalWrite(colPin, LOW);
digitalWrite(rowPin, HIGH);

just run the sketch several times with different values for colPin & rowPin, for each col & row if you want to be really sure.

Even when you solve your present issue, this will never work well. The problem is current. You just can't get enough into or out of a single Arduino output. The more leds you try to light in parallel connected to the same output, the higher the series resistors need to be to avoid overloading the output. The fewer leds you light in parallel, the higher your multiplex ratio has to be. Whichever way you try, the result is very low brightness. The nearest you can get to a no-driver-chip solution is to use 5 transistors to boost the current to the rows. Or seven transistors to boost the current to each column, but then you might as well use a uln2003, and that's a chip of course!


Well, to be nitpicking..

A transistor isn't considered to be a chip (although it still is a semiconductor, and the vast majority of parts inside a chip are transistors) .
So if transistors will be considered to be acceptable, this can be done by using an array of transistors.
If transistors are out of the question too and only resistors or capacitors are to be used, then the above post gets a 100 % score.