enter image description here

Why do two LEDs not light up together simultaneously? Microcontroller is atmega328p. Output voltage 5 V 200 mA

LED 20mA

When I replace LED by single cable, LED doesn't light up too. LED lights up only when one of its leads is directly connected to microcontroller pin.

enter image description here

Also when I disconnect an LED at first microcontroller's port, an LED connected to another microcontroller's port lights up brighter.

Edit: Here is video that illustrate my problem


  • 2
    \$\begingroup\$ You're going to fry your chip with this setup, you need resistors. \$\endgroup\$
    – Mat
    Commented Aug 19, 2023 at 18:20
  • \$\begingroup\$ which two LEDs? ... there are three in the picture \$\endgroup\$
    – jsotola
    Commented Aug 19, 2023 at 18:24
  • 8
    \$\begingroup\$ Please draw a schematic. \$\endgroup\$
    – winny
    Commented Aug 19, 2023 at 19:12
  • \$\begingroup\$ @winny I uploaded video \$\endgroup\$ Commented Aug 19, 2023 at 20:01
  • 7
    \$\begingroup\$ A video is not a schematic. A schematic is much more useful in showing where the problem is. \$\endgroup\$
    – StarCat
    Commented Aug 19, 2023 at 20:19

2 Answers 2


The LED that doesn't light has both leads plugged into two holes in a 5-hole group - all holes in that row are connected together, so the LED's leads are shorted. If you want the LED to light, its leads must be in different rows.

Please note that you MUST connect a resistor of 390 Ohms or so in series with each LED to limit the current through the LED. Connecting an LED directly from an IC pin to Ground or Vcc may damage the IC by drawing excessive current.


One of the LEDs will never light the two leads are shorted together. enter image description here

  • \$\begingroup\$ When I replace led that bright by cable, second LED doesn't bright too. Anode is in Vcc. See edit. \$\endgroup\$ Commented Aug 19, 2023 at 18:32
  • 3
    \$\begingroup\$ @JakubKutrzeba: your LED has its two pins connected together, it cannot possibly light up. Your second photo seems like you've connected one of the pins output of your microcontroller directly to one of the supply voltages. That pin is likely now dead (permanent damage). Please take some time to look into tutorials or videos on how to make these things work without damaging your stuff. Looks like you are missing the basics. \$\endgroup\$
    – Mat
    Commented Aug 19, 2023 at 19:53
  • \$\begingroup\$ @Mat I uploaded video that illustrate my problem \$\endgroup\$ Commented Aug 19, 2023 at 20:02
  • 6
    \$\begingroup\$ @Jakub, we work with schematics rather than videos. There's a button on the editor toolbar (in your question). It's easy to use. \$\endgroup\$
    – Transistor
    Commented Aug 19, 2023 at 21:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.