title: Arduino: Multiplexing 7-segment display issues
body: <p>I have a 3.5 digit 7-segment LED display which I am trying to drive with an Arduino.
  The Arduino runs a shift register with a latch (M74HC595).
  The 8 outputs of the shift register go through 2000Ohm resistors and into the 8 segment pins of the display.
  The three digit controlling pins of the display go to three pins on the Arduino.
  The display has a common-cathode, so that when a control pin is LOW, the digit is on, and when it's HIGH, the digit is off.</p>
  
  <p>This works fine as long as I only light up a single digit, or light up multiple digits with the same segments, but once I try to switch the segments between two or three digits, it all gets messed up.
  Segments that shouldn't have light in them, instead have a weak light, which bothers with reading the actual number.</p>
  
  <p>If I add delays between writing to each digit the unwanted lights dim some more, but soon enough the whole thing blinks because of high delays and is unusable.</p>
  
  <p>Am I doing something wrong?</p>
  
  <p>To enable a specific digit, I set the controlling pins on the Arduino, for example this is how I enable the first digit:</p>
  
  <pre><code>digitalWrite(digit1, LOW);
  digitalWrite(digit2, HIGH);
  digitalWrite(digit3, HIGH);
  </code></pre>
  
  <p>Then to push a number to the shift register and move it to the latch (and hence to the display):</p>
  
  <pre><code>digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, number);
  digitalWrite(latchPin, HIGH);
  </code></pre>
  
  <p>This is my scheme:</p>
  
  <p><img src="https://i.stack.imgur.com/uhzhn.png" alt="Scheme"></p>