Multiplexing a 3x3 led array with an Arduino

Multiplexing LEDs explained

Multiplexing and charlieplexing can be quite a confusing task, and requires the use of transistors to switch the negative channels. I made this sketch to help people understand this concept and how to address each led. Also I am using this type of setup for my new 8x8 dual color led array display :D Hoping to have that created in Fritzing soon so I can share it with everyone.

I will have the code uploaded for this project as well very soon.

By hexskrew
Created on February 4, 2011, 08:25

Category: Digital

Difficulty: amateurs

License:  Creative Commons Attribution-Share Alike 3.0 Unported License

Tags: charlieplexing, multiplexing, led, leds, arduino, transistor

Files

Comments

  1. hexskrew # Feb. 5, 2011, 2:21 a.m.

    Some sample Arduino code for a quick chaser: /* 3x3 multiplexed LED chaser on a breadboard */ void setup() { pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(11, OUTPUT); pinMode(12, OUTPUT); pinMode(13, OUTPUT); } void loop() { int a=7; int b=13; int c = 0; if (c < 3) { digitalWrite(a,HIGH); digitalWrite(b,HIGH); a--; b--; c++; ledoff(); } digitalWrite(7,HIGH); digitalWrite(11,HIGH); ledoff(); digitalWrite(6,HIGH); digitalWrite(13,HIGH); ledoff(); digitalWrite(5,HIGH); digitalWrite(12,HIGH); ledoff(); digitalWrite(7,HIGH); digitalWrite(12,HIGH); ledoff(); digitalWrite(6,HIGH); digitalWrite(11,HIGH); ledoff(); digitalWrite(5,HIGH); digitalWrite(13,HIGH); ledoff(); } void ledoff() { digitalWrite(5, LOW); digitalWrite(6, LOW); digitalWrite(7, LOW); digitalWrite(11, LOW); digitalWrite(12, LOW); digitalWrite(13, LOW); delay(500); }

Login to post a comment...
  • Print this
© 2007 - 2011 University of Applied Sciences Potsdam