Maker Pro
Maker Pro

push buttons + led interface to avr pins

i am interfacing push buttons and leds to avr in such a way that when the button is pressed the led also glows.. now the point is that i want it to glow by itself and not by mcu ... check the circuit ...attached..
84_1286179499.png


when i used the same circuit during testing using 5mm LEDs the system worked.. a valid zero was avaible on pin of mcu, but hwen i made some prototype boards using SMD LEDs the PIN doesnt get valid zero, i checked the Voltage across the LED when it was on and that was 2.1 V ... what i can i do to make it valid one...
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
A better option is to place the connection to the AVR at a point between the switch and the LED. Then place a high value resistor (47K should be fine) across the LED. This will ensure the input sees a full rail to rail swing, regardless of the colour of LED you use.
 
Top