In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Electronegativity wrote: Quoting Paul Baker from the thread I linked above: [quote="Now for LEDs, they have a voltage drop across them when they are turned on (Vf), so to calculate the correct value for your resistor, use: R=(Vdd-Vf)/I, where I is the desired current, not to exceed the maximum current for the SX pin, then choose the closest value of resistor that is higher than the resistance you calculated. Never drive an LED without a current limiting resistor, even if you are doing switching to limit the overall current, if there is a bug in you program, or if you program hangs while the pin is on, you will fry your LED and perhaps even the SX. If the number of elements you have to drive requires more than the total current the SX20 can handle, you will have to use a driver for the LEDs such as a darlington array."][/quote] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=87994#m88064 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)