LED & Resistor befuddlement

OK, if the LED is connected, what will you see? Still a low?

Reply to
Mike Turco
Loading thread data ...

We are not communicating somehow. If the LED and current limit resistor are connected to VCC and you have a 1.5 volt drop, the IO pin will be at

3.5 volts which is *well* above the required 2.0 volts for a TTL input.

But as I said, the voltage drop across an LED or any other diode is a function of current. If you have a very light current, you can get the voltage drop to anything you want. Since CMOS inputs are typically rated for 0.7 * VCC you will need an off state voltage on the IO pin of

3.5 volts min to see a one and show the LED is connected. Until someone shows me otherwise with a IV curve, I expect you can reach that voltage with a 1 MOhm pulldown.

The mux can be either a digital mux with inputs and outputs, or you can use an analog switch type mux. If you use an analog switch, you can get away with just one sense circuit, but then I may not understand what the mux is doing. Can't you use your outputs as OC drivers and also inputs and do without the mux?

You are thinking of an LED that is connected to ground. Connect it to VCC instead and you get 3 to 3.5 volts in the pulled up state with a stiff pulldown resistor. Use a (very) light pulldown and you will get a higher voltage.

What do you call "reasonable limits"? What voltage do you get with 4 uA vs. 4 mA? If you think a diode is a constant voltage device, you need to go back to your textbooks. All diodes that I work with have a logarithmic IV curve.

I think the real problem here is that you are not following what I am proposing. Check the circuit that I drew again. You will see that the IO pin will not see .8 to 2 volts. It will either be ground when the LED is turned on, or some high voltage determined by the VCC minus LED voltage with an appropriately low test current.

--

Rick "rickman" Collins

rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design      URL http://www.arius.com
4 King Ave                               301-682-7772 Voice
Frederick, MD 21701-3110                 301-682-7666 FAX
Reply to
rickman

With the LED in the circuit the pin will be pulled up very quickly to a high voltage.

--

Rick "rickman" Collins

rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design      URL http://www.arius.com
4 King Ave                               301-682-7772 Voice
Frederick, MD 21701-3110                 301-682-7666 FAX
Reply to
rickman

should

I'm not clear on the concept. Is this the circuit?

+5 | | 1k ohm | | LED |

----------------- I/O

If the LED is not in the circuit, given the capacitance of a CMOS output, I can see the output staying at whichever state it is driven for long enough to be measured (State 1 & 2).

1) No LED. Output 0 & measure back 0

2) No LED. Output 1 & measure back 1

When you put the LED in the circuit, I guess I don't understand how it is to operate (State 3 & 4):

3) Has LED. Output 0 & measure back ? (Turns on LED)

4) Has LED. Output 1 & measure back ?

Thanks,

Mike

Reply to
Mike Turco

I am slightly lysdexic and, oddly enough, a visual thinker. This ASCII art stuff really throws me for a loop. Any chance you could email me a .gif? My email address is snipped-for-privacy@miketurcoisamillionaire.com , minus the part about 'is a millionaire'.

Thanks,

Mike

Reply to
Mike Turco

The LED also has to be visible.

Reply to
Mike Turco

1) No LED. Output 0, disable output, measure back 0

When you put the LED in the circuit, I guess I don't understand how it is to operate (State 3 & 4):

2) Has LED. Output 0, disable output, measure back 1
--

Rick "rickman" Collins

rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design      URL http://www.arius.com
4 King Ave                               301-682-7772 Voice
Frederick, MD 21701-3110                 301-682-7666 FAX
Reply to
rickman

This circuit fulfills your requirements and works just like you want it to. Furthermore, you can use any value resistor practical.

With LED in circuit

  1. Output logic low Led draws current and output pin goes to within Vss Parasitic capacitance of pin is now at this level

  1. Release output (tristate) Pin is now high impedance with parasitic input capacitance holding last state.

  2. very short delay Resistor + led charges parasitic input capacitance up to within Vdd

  1. Read input as logic high

  2. Switch pin back to an output to whatever state you want.

With no LED in circuit

  1. Output logic low Led draws current and output pin goes to within Vss Parasitic capacitance of pin is now at this level

  1. Release output (tristate) Pin is now high impedance with parasitic input capacitance holding last state.

  2. very short delay As there is nothing connected to input pin the parasitic input capacitor will hold the last state (logic low). This may eventually float to some indeterminate state if left in this condition.

  1. Read input as logic low

  2. Switch pin back to an output to whatever state you want.

-- Peter Jakacki

Reply to
Peter Jakacki

1.0 V @ 0.06uA 1.94V @ 1uA (visible in dim light) 2.23V @ 4uA 2.59V @ 100uA (quite visibly lit) 2.79V @ 1mA 3.08V @ 10mA (blindingly bright)

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

What type of LED is this? I have never seen one that was "blindingly bright" at 10 mA and I have not seen one with a 3 volt Vf. Can you test a standard red LED that is designed to operate at 10 to 20 mA?

--

Rick "rickman" Collins

rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design      URL http://www.arius.com
4 King Ave                               301-682-7772 Voice
Frederick, MD 21701-3110                 301-682-7666 FAX
Reply to
rickman

Never seen a superbright blue led? They ARE blindingly bright at 10mA and almost hurt your eyes at 20mA. And yes, blue LEDs have a Vf of 3V

Meindert

Reply to
Meindert Sprang

The above solution is a little flakey.

If you like, add an external capacitor and a pull-down resistor.

-- Joe Legris

Reply to
Joe Legris

Ok, but I don't think the OP was working with superbright blue LEDs. Aren't they pretty pricey?

--

Rick "rickman" Collins

rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.

Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design      URL http://www.arius.com
4 King Ave                               301-682-7772 Voice
Frederick, MD 21701-3110                 301-682-7666 FAX
Reply to
rickman

Reply to
Spehro Pefhany

Care to quantify flakey???? As I stated, this solution works, is repeatable, and is based on real-life component parametric behaviour.

*Any fool knows that a rock can't burn Marco.*

The original poster called for only two components, the led, and the resistor. You have just doubled his component count and left the solution open-ended by omitting details.

Besides, where's the fun in doing things the easy way. Have fun in meeting the challenge and then afterwards the solution becomes the new "easy way", till next time...

-- Peter Jakacki

Joe Legris wrote:

Reply to
Peter Jakacki

"Spehro Pefhany" schreef in bericht news: snipped-for-privacy@4ax.com...

How did you measure the 1.0V @ 0.06 uA ?

--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)
Reply to
Frank Bemelman

"Spehro Pefhany" schreef in bericht news: snipped-for-privacy@4ax.com...

I guess I should get one of those ;)

--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)
Reply to
Frank Bemelman

What a nifty idea!! Now I'm interested to check what other uCs can operate this way!

Reply to
DM McGowan II

Huh? Have you never read the data sheets and looked at the I/O structure? There is no reason why they shouldn't operate this way, in fact it requires more effort in the way of gating to disable the digital output. Why handicap a port structure then. The only exception I've seen has been on some odd micros where the A/D pins are dedicated and are not mixed with GPIO.

Also, some micros allow you to read the digital state of the pin directly vs reading the output register when the pin is in output mode. Why? This is because the resistance from drain to source of the CMOS output transistor (amongst other things)limits the amount of current that can be supplied to the load. Sometimes the load can be heavily capacitive and it could be necessary to check that it has reached the state that it has been driven to.

General Rule:- READ data sheets, even those funny little charts and tables, and figures at the end of them :)

-- Peter Jakacki

DM McGowan II wrote:

Reply to
Peter Jakacki

operate

If I dealt in electronics every single day then maybe this wouldn't have seemed so cool. I remember coming across something along these lines once or twice and I liked Spehro's idea. If you don't like his idea then I'll thank you to reply to HIM, not ME.

Reply to
DM McGowan II

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.