> Please let me pose a question. What would you do to get 15 mA into a red > LED when the PIC output is positive and it's supplied with 5 volts or > less? I don't see any way to do it with a resistor, you won't get enough > current. Let's say the LED drops 2V at 15mA, which would be reasonably typical of a standard red LED. The spec sheet doesn't give a maximum guaranteed voltage when sourcing 15mA, so you should calculate the resistor assuming the worst case which is that it stays at 5V. (5V - 2V) / 15mA = 200 ohms. Of course that guarantees not to exceed 15mA, not that it will always be 15mA. If you want to get a higher current, then substitute 20mA (the assumed LED maximum current) into the equation above and use a 150 ohm resistor. If the LED can take more current, then the limit is the 25mA allowed per PIC port pin, which results in 120 ohms. So there are three choices depending on what you want to make sure you don't exceed. If you cared more about the exact LED current, then using the PIC port to sink rather than source the current would be better because the low side drivers are known to be stronger. If you want a guaranteed 15mA +-5% thru the LED, then driving it directly from a PIC pin isn't the answer. Some things are just not guaranteed. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body