Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

about connecting leds to 89c51...pls help me...

Status
Not open for further replies.

subinalex

New Member
dear friends,

For a project i have 8 leds connected to port 0 with 1k zip pull ups
now my question is about connecting led

1.Is it safe connecting led's anode to Vcc through a 220 ohm resistor and cathode to port 0 which already has 1k zip resistors.

2. for connecting led to output of a driver ic l293d..which output 9v...what confgn of led i must use?..and need i connect it with cathode of led to pin of l293d and anode to vcc through 220 ohm?.....

Please answer my questions...i am afraid to connect it because i fear uc will burn or so?...and i hav only 1 uc.....
 
when i connected buzzer red wire to port pin and black wire to gnd i couldnt hear any sound....i also connected led also in this manner...then it didnt blinked...


but when i connected its red wire to vcc and black wire to port pin i was able to hear sound as per i wrote in the program......thiss why i ask whether same should be done for leds.??
 
89C51 MCU's cannot source or sink significant currents. You would be much better off using buffer IC's to protect the MCU I/O and to provide the current needed to drive things like LED's & buzzers. The MCU outputs can pull to ground much stronger than they can pull up to Vcc. Always check the pertinent data sheet on how much current the I/O can source/sink.
 
dear friends....


My LED whose anode connected to port 0 which has a zip resistor(pull up) and cathode to gnd is not blinking wherea on multimeter it shows the port is high....


shall i connect led's anode to pull up resistor and cathode to the port pin....now as the zip resistor and port pin is parallel....i have a doubt is it shorted or so?......
 
Why do you have 1k resistors pulling up Port 0? If you must use pullups, use 10k or more. The 1k resistors consume nearly half the current the port can provide safely.
IMHO Always use a transistor or transistor array to drive output devices such as LED's and buzzers, motors, and death rays.
To answer your last question - DO NOT DIRECTLY CONNECT THE LED TO YOUR MCU PORT PIN. THE PORT CANNOT, REPEAT, CANNOT HANDLE THE CURRENT THESE DEVICES REQUIRE.
 
hey friends..........

:D i got all leds blinking.....

i connected anode of green led to pull up resistor of port 0 and cathode to ground ..it blinked...

then i connected cathode of yellow led to port 2 and its anode to 5 v through 220 ohm....got it also correct similarly i connected buzzer also working fine.....


AM I IN CORRECT PATH.....????
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top