---
+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Junior Member level 1
    Points: 542, Level: 4

    Join Date
    May 2010
    Location
    kattappana
    Posts
    15
    Helped
    0 / 0
    Points
    542
    Level
    4

    Re: Is it wrong to connect led in this way to at89c51???

    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.....

    Added after 6 minutes:

    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.??

    •   Alt21st June 2010, 13:42

      advertising

        
       

  2. #2
    Advanced Member level 5
    Points: 22,287, Level: 36

    Join Date
    Apr 2008
    Location
    EU
    Posts
    2,320
    Helped
    325 / 325
    Points
    22,287
    Level
    36

    Is it wrong to connect led in this way to at89c51???

    Hi,
    Becouse its OutHi= max ca 7.6V & OutLow= max ca 1.4V, your LED will have ca. 7.6V = you need a current limiting serial resistor for both configuration...
    You must read a datasheet of your buzzer, maybe it need some voltage/current threshold to work_as immer_ & your uC output was others controlled...
    I dont believe that your uC can be dead if the output is loaded with 1KOhm & a LED, on a 5V system it means only ca. 3mA output current.
    Most modern uC delivers up to 20 mA/pin, but often has a power limit/package...
    K.



    •   Alt21st June 2010, 13:50

      advertising

        
       

  3. #3
    Advanced Member level 5
    Points: 27,934, Level: 40
    pranam77's Avatar
    Join Date
    Apr 2008
    Location
    Mangalore (INDIA)
    Posts
    2,749
    Helped
    601 / 601
    Points
    27,934
    Level
    40

    Re: Is it wrong to connect led in this way to at89c51???

    Quote Originally Posted by subinalex
    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.....

    Added after 6 minutes:

    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.??
    If your supply is 5volts, the 1K sips pulling up the port 0 is a bit more. You may use a 4K7 sip comfortably. Connecting of LED's + to vcc and 220E to port is fine when vcc is 5 volts.

    For connecting led to output of a driver ic l293d..which output 9v...first confirm on which logic of the IC you need to glow the LED? LOw or HI and then connect it in the required way. 220E is a bit low for Vcc 9 v. 1K will suit best for a RED LED.

    8051's ports tend to pull toward GND when activated. You need to configuer your external circuits in the same way. Unlike in PIC, you can make a PIN HI, LOW, or even Float it.
    Cheers



    •   Alt22nd June 2010, 13:04

      advertising

        
       

  4. #4
    Junior Member level 1
    Points: 542, Level: 4

    Join Date
    May 2010
    Location
    kattappana
    Posts
    15
    Helped
    0 / 0
    Points
    542
    Level
    4

    Re: Is it wrong to connect led in this way to at89c51???

    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?......



  5. #5
    Advanced Member level 5
    Points: 22,287, Level: 36

    Join Date
    Apr 2008
    Location
    EU
    Posts
    2,320
    Helped
    325 / 325
    Points
    22,287
    Level
    36

    Is it wrong to connect led in this way to at89c51???

    Hi,
    Do you know pls how many voltage & current your blinking LED needs?
    Test it pls to first on an external supply...
    K.



  6. #6
    Junior Member level 1
    Points: 542, Level: 4

    Join Date
    May 2010
    Location
    kattappana
    Posts
    15
    Helped
    0 / 0
    Points
    542
    Level
    4

    Re: Is it wrong to connect led in this way to at89c51???

    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.....????



+ Post New Thread
Please login