View Full Version : Inputs going thru LEDs on the way to a '165
06-08-2005, 10:43 AM
I have a group of 4 to 8 push buttons providing input to a '165.· I want to have an LED light next to each button when the button is pressed.· Since the 165 doesn't seem to sink enough current to light the LED (it gets more current from the pull-up resistor to give it a dim glow), is there any other way to make these indicator LED light?
06-08-2005, 12:03 PM
·· How about using double-pole push-buttons...When you press them, the second circuit can turn on the LED.· If you need the LED to stay on, you could use a 74HC595 on the same data/clock lines as the '165.
Parallax Tech Support
06-08-2005, 10:09 PM
I'd draw a pix if I had the software, so I'll try to verbalize·this idea/option·instead.· I start with a set of standard pushbutton connections to the 165 with a 10K pull-up resister on each pin.· Since I'm a noob, I tried connecting a LED w/220 resistor off the pin as well incorrectly thinking that some current from the button would reach the LED since the 165 has such a small draw.· In reality, when the button is off, the LED dimly lights due to the pull-up, and when the button is on, the LED turns off due to the 165 taking the current.· Would it be work (make sense) if I powered·each LED by an inverter (with a small resistor in front) coming from the pin?· That way when the button is up, a pull-up resistor will send a 1 to the inverter (and turn off the LED).· When the button is down, the inverter would get a 0 since·the small resistor in front of the inverter lets all the current go to the pin?· I know a·dual pole·would be easier, but I can't find one the customer likes or wants to pay for since I already have the SPST he really likes and the quantity of switches (multiple instances of this setup) makes this cost prohibitive.
06-08-2005, 10:29 PM
·· This thread is started to sound eerily like another one for modding a DDR pad to light up.· Anyway, yes, you can use the inverter to do what you want.· You can drive multiple device inputs in the manner you describe without issue.
Parallax Tech Support
06-08-2005, 10:38 PM
Just to get back to basics for a moment, what is the point or purpose for having the lights?
Is the LED supposed to be ON and stay ON when the switch is turned ON or is the light just momentary and so too the button?
06-09-2005, 12:33 AM
There will be a box controlling popup targets and other items.· A target will be "alive" when the controlling button is on.· These are on-off buttons, not momentaries.· The LEDs, located above each button, are indicator lights that a given target is still alive.
06-09-2005, 12:53 AM
I would just use an inverter like you mentioned before to act as a driver for the LED.
Free schematic drawing software at www.expresspcb.com (http://www.expresspcb.com)
Easy to make a drawing and post in these forums.
06-09-2005, 11:11 AM
I've attached an ExpressSCH (.sch) file and .bmp showing one side of the LEDs in series with 510 ohm resistors hooked up to the input pins of a '165.· The other side of the LEDs would go to +5V.· The J1 connections, besides connecting to the '165 inputs would also connect to one side of your switches while the other side of your switches would go to ground.· Hope this helps.
06-09-2005, 12:13 PM
The inputs on a 74HC165 must connect to a gnd to register.· I tried your suggestion but it failed to trigger the 165 input properly.· However, I did put theory to practice using an inverter and I observed the proper outcome.· For future projects, does anyone make an pushbutton that lights when pushed that doesn't require move than 5V?
06-09-2005, 06:31 PM
If you use the 74LS165 (TTL version)·you can probably do it with the attached circuit.· The 1K resistor will hold the input low until the switch is closed.· Assuming a drop across the LED of about 1.5 volts, you should get about 3.5v at the input pin·when the button is pressed -- this is above the 2 volt Vih spec for the part.·
Note that you would use the Qh output with the inputs being active-high.
Applications Engineer, Parallax
Post Edited (Jon Williams (Parallax)) : 6/9/2005 11:39:10 AM GMT