Re: Sink/Sorce a Led
Um, I think you need a bit of clarity with your terminology:
If the LED is EVER turned on (meaning light is coming from it), then the LED spec that you want to look at is the If (stands for forward current). For instance, if the forward current If of a specific LED is 30mA on the datasheet, then you should not EXCEED 30mA going through the diode (it is okay to use less current than 30mA, but not more).
If you are using a CMOS gate, it usually is an NMOS and a PMOS with their drains connected together. If you are SOURCING current from the CMOS gate, then this probably means that the PMOS transistor is on, the NMOS transistor is off, and current is flowing OUT of the output of the gate, and IN TO the anode (positive end) of the LED, and OUT of the cathode of the LED, to ground. This assumes that the LED is connected from the output of the gate to ground.
If you are SINKING current from the cmos gate, the NMOS gate transistor is on, the PMOS is off, and current is flowing from the LED INTO the cmos gate output. This would assume that the anode of the LED is connected to Vdd (your power supply), and the cathode of the LED is connected to the output of the cmos gate.