The tutorial for the 74HC595 (http://www.arduino.cc/en/Tutorial/ShiftOut) says that a 220 ohm resistor is needed to regulate the current supplied the LEDs. Is this true for all cases? Suppose I had an led with the following specifications:
RED: Typical: 2 V Max: 2.4V GREEN: Typical: 3.4 V Max: 3.8V BLUE: Typical: 3.4 V Max: 3.8V
DC Forward Current:20mA
Is this how you calculate the resistor value?
Green and Blue R = (VS - VL) / I R = (5 - 3.8) / .02 R >= 60 ohms
Red R = (5 - 2.4) / .02 R >= 130 ohms
This is done assuming 5vs is supplied to the chip.