Driving two leds from one pin
ErNa
Posts: 1,752
Hello, I wanted to have two leds, but only had one free pin. So I connected the leds in serial, but took care, the operating voltage is <=3.3V. The output pin is connected via a resistor to the center tab of the diodes. Whenever the pin is tristated, no current flows, when active high, the lower diode is lit, when active low, the upper one. Works quite well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
Post Edited (ErNa) : 5/29/2010 6:37:24 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
Post Edited (ErNa) : 5/29/2010 6:37:24 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
Las - Large model assembler Largos - upcoming nano operating system
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
In this manor to drive higher current/voltage LED’s ?
-Phil.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
EDIT: attached a schematic of what I mean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Post Edited (Peter Jakacki) : 5/29/2010 10:33:38 PM GMT
electronicdesign.com/article/digital/circuit-controls-two-leds-with-one-microcontroller.aspx
... and I know for sure this has come up in the forums more than a few times even before then.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
The scheme that Miner mentioned involves two pins to drive one piezo whereas this whole thread is about driving two leds with one pin so it should really be another thread. However, the two pin method is very common for capacitive loads such as piezo elements (not active piezo buzzers). Typically piezos need a bit of drive voltage and because of the capacitance should really be driven in push-pull configuration which is what you get when you use two I/O pins in full-bridge configuration.
As to driving leds and sensing buttons in a matrix with a "minimum" of pins you should look to the charlieplexing threads, start around here:
http://forums.parallax.com/showthread.php?p=696424
About the information OBEX I agree, I did look into this a while ago but we need some more input as to how to set it up. I'm thinking of just setting up a Yahoo group just to collect this information but I don't want to shift any forum discussion away from here though, so it requires a bit of thought as to how to do it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
1.· Tristate outputs:· Both LEDs can be off.
2.· 40 mA per pin source/sink:· Both LEDs can be driven at their usual 20 mA average current limit.
3.· Multicore:· Can easily use a spare cog to have 256 or more brightness levels for each LED.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
8.1. Absolute Maximum Ratings
Stresses in excess of the absolute maximum ratings can cause permanent damage to the device. These are absolute stress
ratings only. Functional operation of the device is not implied at these or any other conditions in excess of those given in the
remainder of Section 7.0. Exposure to absolute maximum ratings for extended periods can adversely affect device reliability.
Bear in mind too while we are talking about AMRs (for the sake of a better abbreviation) that the Prop has a AMR of 300mA through the Vss and Vdd connection (as one). As the maximum operating current of all 8 cogs at 80MHz is around 100ma then this does not leave 200ma to play with as 300ma is the AMR remember so I wouldn't push more than say 160ma through all the I/O combined.
In general it is best not to bandy about any AMR figures as if they were operating conditions.
Also, the other exception I take to is quoting the average current limit of LEDs as 20ma!! Unless I am trying to blind the operator I usually operate in the more sedate but exceedingly bright range of a few mAs. I know that there are D grade LEDs left over from the 70's that might need 20mAs just to glow but they are the exception.
I'm a bit curious as to your first statement though, aren't all processor I/Os tristateable (except for some 8051 variants etc)?
Other than "that" I concur with your statements.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
But, I have to agree it's best to stay below AMR...
My main point is that the Prop can drive much higher currents than a couple other chips I've looked at...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
Hello Rest Of The World
Hello Debris
Install a propeller and blow them away
You can check out the quad half-H driver parallax carries (http://www.parallax.com/Store/Components/AllIntegratedCircuits/tabid/154/CategoryID/31/List/0/SortField/0/catpageindex/3/Level/a/ProductID/608/Default.aspx).