Why wont this work - led with the prop "sinking" style
Bits
Posts: 414
I was thinking that this was going to be simple but I am struggling for some reason. Can someone point out the obvious thing I am missing here please.
Attachment not found.
Attachment not found.
Pub main SetNumber repeat Pub SetNumber Dira[8]~ Outa[8] := %0
Comments
A output with it state as 1 = Vdd.
A output with it state as 0 = Vss = Sinking
Sinking is the old way where 0 = on. Much better to source and put the led to gnd. The a 1 = on.
-Phil
Too much of a load on the 3.3V supply is not good though as the Prop and other chips are also connected to this source. Frequently though my 3.3V is regulated from 5V so if I have a few leds that I like to drive hard I will choose to drive them in sink fashion but with the anodes connected to the +5V supply. Red leds have a voltage drop of around 1.6V at low currents climbing to a typical 1.8V with decent drive. All other leds have a higher voltage drop, 1.8..2 for green etc. The maximum voltage therefore that the Prop I/O pin will see is 5V-1.6V = 3.4V, just above the 3.3V threshold but still within the +/- 300mV limits. There is a tiny caveat with red leds though as they can "glow" dimly even when they are turned off due to the minute current flowing at this near cutoff voltage. If it's a concern I just use a bleed resistor or a series diode if I really want a red led driven from +5V.
BTW, the reason I might drive the leds harder is because even though I use ultra-brights mostly, I may need to make them visible in bright sunlight (not all of us live in caves you know).