<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Multiplexing</title><link>https://sourceforge.net/p/pisnowflake/wiki/Multiplexing/</link><description>Recent changes to Multiplexing</description><atom:link href="https://sourceforge.net/p/pisnowflake/wiki/Multiplexing/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 05 Dec 2014 22:07:57 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pisnowflake/wiki/Multiplexing/feed" rel="self" type="application/rss+xml"/><item><title>Multiplexing modified by Bernhard Trummer</title><link>https://sourceforge.net/p/pisnowflake/wiki/Multiplexing/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,3 +1,41 @@
 ## Multiplexing

-TODO
+Since I use common-anode LEDs and constant current sink driver chips,
+the multiplexing must be done with "high side" switches.
+First I tried to use TIP-125/127 PNP darlingtons,
+but I decided to go with p-channel MOSFETs instead to have less voltage drop.
+The best choices for me were the Fairchild NDP6020P and Sanyo 2SJ655.
+However, any "logic level" p-channel MOSFET capable of switching around 2 Amps should be fine.
+
+For switching the MOSFETs I use a 74HC138, where you can use three GPIO pins of the Pi to switch between 1 out of 8 outputs.
+This means that it's kind of impossible to turn on all segments at once by mistake
+(due to a bug in the player for example), which in the worst case could damage something.
+
+### Wiring it up
+
+* Connect the Sources of the MOSFETS to +5V.
+* Connect each Drain to the common anode of one segment.
+* Connect the Gates to the outputs of the 74HC138.
+* Connect the A0-A2 inputs of the 74HC138 to GPIO pins of the Pi.
+* Connect E1' and E2' to GND.
+
+Additionally I connected E3 to another GPIO pin to be able to switch off all segments at once.
+In combination with the WS drivers, this turned out to be useful because of the 600 us delay between clocking in the data and when the data is latched to the outputs:
+
+* clock in data for next segment
+* wait 300 us
+* disable all segments
+* wait 300 us
+* enable next segment
+* wait around 1-2 ms
+* repeat with the next segment
+
+### Ghosting
+
+When building up a small multiplexing prototype,
+I noticed some "ghosting" or "color bleeding" effects
+when multiplexing at high "frame rates".
+When displaying a test picture where all LEDs of just one segment are on,
+all the other LEDs seemed to "glow" a bit, mostly in a green shade.
+
+The solution for this issue was to put a 10k resistor between each MOSFET Drain and GND.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bernhard Trummer</dc:creator><pubDate>Fri, 05 Dec 2014 22:07:57 -0000</pubDate><guid>https://sourceforge.net5be544dff52e9a5bca1250c0213326f9e2758cc1</guid></item><item><title>Multiplexing modified by Bernhard Trummer</title><link>https://sourceforge.net/p/pisnowflake/wiki/Multiplexing/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="multiplexing"&gt;Multiplexing&lt;/h2&gt;
&lt;p&gt;TODO&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bernhard Trummer</dc:creator><pubDate>Mon, 01 Dec 2014 20:39:50 -0000</pubDate><guid>https://sourceforge.netc233020ed9da627f876a0582e90a58b7d9f3f5e1</guid></item></channel></rss>