<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Charlieplexing a LED</title>
		<link>http://forums.leaflabs.com/topic.php?id=598</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:09:30 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=598" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3382</link>
			<pubDate>Tue, 18 Jan 2011 18:40:18 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3382@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;The natural log of 64 is over 4 (and most things in nature seem to be natural logs :-), so isn't it less than 1/4 the brightness?&#60;/p&#62;
&#60;p&#62;That aside, if you've tested it, and are happy, everything is fine; that's all that I was trying to alert you to.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3374</link>
			<pubDate>Sun, 16 Jan 2011 22:20:55 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3374@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I haven't wired it up since I'm sending my Maple back due to my USB connector coming off. &#60;/p&#62;
&#60;p&#62;Anyway, the code for the PWM and timing interrupt is done, and I was able to test it with just two LEDs connected being lit at 1:64. The RGB LEDs I'm using are bright enough to make me squint when constantly powered, and also because our perception of brightness increases logarithmically not linearly 1:64 appears to be about a 3rd of the normal brightness. This is acceptable because I'm building a display where I just want to 'pixels' to change colour and not glow.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3373</link>
			<pubDate>Sat, 15 Jan 2011 21:12:16 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3373@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Have you wired this up and got it working? Does it look okay?&#60;/p&#62;
&#60;p&#62;Each LED row will have a mark:space ratio of 1:63, so I'd expect it to be dim.&#60;/p&#62;
&#60;p&#62;When I've run 8 columns x 16 rows (using a couple of 8x8 LED matrix displays) they seemed noticably dim.&#60;/p&#62;
&#60;p&#62;So it wouldn't need all wiring up, it'd just need to run the LEDs at a mark:space of 1:63.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3362</link>
			<pubDate>Thu, 13 Jan 2011 20:55:54 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3362@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Here you go:&#60;/p&#62;
&#60;p&#62;&#60;a&#62;http://img40.imageshack.us/img40/5043/ledmatrix.png&#60;/a&#62; 1208x844 - 54Kb.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3358</link>
			<pubDate>Thu, 13 Jan 2011 11:19:58 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3358@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;wow 960 channels off of 21 GPIO's? can you post a simple schematic? Im not sure I fuly understand how youve managed to pull that off. Very interesting...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3356</link>
			<pubDate>Thu, 13 Jan 2011 08:53:02 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3356@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Charlieplexing proved promising at first with its higher LED-count-per-pin (n(n-1) LEDs to pins) that conventional LED matrices, but by binary selecting the row you can dramatically save on pin count (p(2^n)). I use the 15 PWM pins to power the column pixels, and 6 other GPIO to binary select the row to ground (leading to a maximum of 64 rows even though not all rows are used).&#60;/p&#62;
&#60;p&#62;The system I've implemented allows up to 960 LED channels (I use the term 'channel' rather than 'LED' because I'm using RGB LEDs) even though the number actually used are a lot less. I haven't done a large scale test yet since I need to construct the board the LEDs will be placed on.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3344</link>
			<pubDate>Wed, 12 Jan 2011 15:26:31 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">3344@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Be careful driving current into an output pin. For example if you wire two GPIO's together, both as outputs and drive a 1 into a 0, you risk frying the internal gpio circuitry. &#60;/p&#62;
&#60;p&#62;If you are trying to drive LED's in a matrix style, I recommend wiring them up with each row sharing a single cathode and each column sharing a single anode - then using one transistor per row to source current through that row, and one transistor per column to drain that current to ground. Err I dont have a diagram but I can provide more info if needed, we did this in an 8x8 grid for some project a while back and it worked fine.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>soundcyst on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3320</link>
			<pubDate>Fri, 07 Jan 2011 13:38:01 +0000</pubDate>
			<dc:creator>soundcyst</dc:creator>
			<guid isPermaLink="false">3320@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;right, changing the pin direction only comes into play when there are more than two pins in use so that only two pins are source/sink-ing at a time.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://en.wikipedia.org/wiki/Charlieplexing#Charlieplexing&#34; rel=&#34;nofollow&#34;&#62;http://en.wikipedia.org/wiki/Charlieplexing#Charlieplexing&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;if less than two pins are source/sink, then it won't work, and if more than two pins are source/sink, more than one LED will light up at a time.&#60;/p&#62;
&#60;p&#62;so, my comment above about changing pin directions is really only applicable to the 2-led version
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3315</link>
			<pubDate>Fri, 07 Jan 2011 10:38:15 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3315@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I don't believe it is essential to change the pinMode when using two pins to drive two LEDs, but it would do no harm when both LEDs are off.&#60;/p&#62;
&#60;p&#62;It is not essential to change the pinMode of pins when driving a simple matrix of LEDs (single LEDs), but again, it would do no harm.&#60;/p&#62;
&#60;p&#62;But, I have never found a way to drive a matrix of 'Charlieplexed' LEDs (i.e. LEDs which are 'paired' to be driven with inverted signals) without setting some pins to high-impedance, i.e. INPUT. &#60;/p&#62;
&#60;p&#62;I think a good place to start is driving 8 LEDs with 4 pins. It is also important to ensure their are no pull-up or pull-down resistors active, otherwise there will be a dim LED glow even when the pin is in INPUT mode.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>soundcyst on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3301</link>
			<pubDate>Wed, 05 Jan 2011 14:51:35 +0000</pubDate>
			<dc:creator>soundcyst</dc:creator>
			<guid isPermaLink="false">3301@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;yeah, you definitely want them both to be outputs, but you shouldn't need to change the pin mode in the loop.&#60;/p&#62;
&#60;p&#62;try:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;void setup()
{
    //config directions
    pinMode(0, OUTPUT);
    pinMode(1, OUTPUT);

    //init to both off
    digitalWrite(0, LOW);
    digitalwrite(1, LOW);
}

void loop()
{
    digitalWrite(0, LOW);
    digitalWrite(1, HIGH);
    delay(1000);

    digitalWrite(0, HIGH);
    digitalWrite(1, LOW);
    delay(1000);
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3297</link>
			<pubDate>Wed, 05 Jan 2011 05:31:48 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3297@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've solved this problem, rather than use input, I must use OUTPUT_OPEN_DRAIN.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MessiahAndrw on "Charlieplexing a LED"</title>
			<link>http://forums.leaflabs.com/topic.php?id=598#post-3296</link>
			<pubDate>Wed, 05 Jan 2011 04:42:59 +0000</pubDate>
			<dc:creator>MessiahAndrw</dc:creator>
			<guid isPermaLink="false">3296@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
I'm trying to charlieplex a large array of LEDs through the Maple. However to start with I am just trying to control 2 LEDs via 2 pins like in this diagram:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://upload.wikimedia.org/wikipedia/commons/a/ad/Complementary_Drive.png&#34; rel=&#34;nofollow&#34;&#62;http://upload.wikimedia.org/wikipedia/commons/a/ad/Complementary_Drive.png&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;What I tried to do is connect an LED from pin 0 to 1, and another LED from pin 1 to 0, then alternate which is glowing by running:&#60;/p&#62;
&#60;p&#62;void loop()&#60;br /&#62;
{&#60;br /&#62;
   pinMode(0, OUTPUT);&#60;br /&#62;
   pinMode(1, INPUT);&#60;br /&#62;
   digitalWrite(0, HIGH);&#60;br /&#62;
   delay(1000);&#60;br /&#62;
   digitalWrite(0, LOW);&#60;/p&#62;
&#60;p&#62;   pinMode(0, INPUT);&#60;br /&#62;
   pinMode(1, OUTPUT);&#60;br /&#62;
   digitalWrite(1, HIGH);&#60;br /&#62;
   delay(1000);&#60;br /&#62;
   digitalWrite(1, LOW);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;But nothing happened.... I tried using just 1 LED from pin 0 to 1..&#60;br /&#62;
void setup()&#60;br /&#62;
{&#60;br /&#62;
   pinMode(0, OUTPUT);&#60;br /&#62;
   pinMode(1, INPUT);&#60;br /&#62;
   digitalWrite(0, HIGH);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void loop()&#60;br /&#62;
{&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;But still nothing happened.. However by connecting from pin 0 to ground, the LED was able to glow. I ruled out that this was an issue with pin 1, because I tried other combinations of pins and they didn't work.&#60;/p&#62;
&#60;p&#62;Is there something I am missing, or cannot the Maple do charlieplexing?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
