Discussion in "General help Guidance and Discussion" started by    ASLANPETER    Sep 6, 2010.
Mon Sep 06 2010, 08:05 PM
Hi Guys,
forgive me, it is surely a silly question but i am stuck. i need to control a led with an output pin of an 8051 micrcontroller. basically the micrcontroller is running a code and when a condition is verified ,an output pin is cleared. this ouput is linked to the anode of a led which should be wired to the VCC via a resisitor. the resistor and LED should be placed on a dedicated bread board which hence should be connected to 5v voltage. what should I do with the GND section on the broadboard?? should i leave it unconnected? will the VCC wire make any sense on its own without GND? or should i rather not to power up the breadboard and connect a resistor leg to the VCC output of the power supply? which is the correct way and why?
thank you

[ Edited Tue Sep 07 2010, 12:53 AM ]
Tue Sep 07 2010, 02:13 AM
the 'gnd' to the LED's cathode is provided by the 8051's port pin,hence you needn't provide gnd on the breadboard...simply Vcc to the anode through the resistor and a port pin connection to the cathode.
But this is assuming you are using the same supply for both the mico and the LED bb.If not you'll have to connect the gnd terminals of both the supplies at some point.
Tue Sep 07 2010, 02:18 PM
There are two ways you can connect LEDs to controller port.

1. Active High Logic
2. Active Low Logic.

1. Active high logic means LED will be on when port pin is 1 and LED will be off when pin is 0. In this type of arrangement, LED is driver from port pin of controller if port pin does not have enough current then a pullup is used on.

       / Resistor
       |   LED
Port -----|>

2. Active low is other way around, when port pin is 0, LED is on and when port pin is 1 LED is off. In this type of arrangement port pin is used as current sinking device, when LED is on current will sink from VCC through resistor and LED then into microcontroller pin. typical connections are like this.

         LED       R
Port -----|<|----/\/\/\---VCC

Tags interfacing LED to controlleractive low led circuitactive high led circuitled interfacing with microcontroller

Get Social


Powered by e107 Forum System


Sun May 09 2021, 07:47 AM
Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates. online casino https://casinogamesvol.com
Sun May 09 2021, 02:09 AM
Saved as a favorite, I like your web site! Casino Online Slots https://casinorealmoneyai.com
Sun May 09 2021, 12:05 AM
Hi, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam responses? If so how do you protect against it, any plugin or anything you can suggest? I get so much lately it's driving me insane so any assistance is very much appreciated. Online casinos https://freecasinoslotsmatic.com
Sat May 08 2021, 09:48 PM
I'm really loving the theme/design of your site. Do you ever run into any browser compatibility problems? A number of my blog readers have complained about my blog not working correctly in Explorer but looks great in Safari. Do you have any recommendations to help fix this issue? online slots https://playslotstime.com
Sat May 08 2021, 09:35 PM
It is not my first time to pay a quick visit this web page, i am visiting this web site dailly and get nice facts from here every day. online casino https://playcasinoslotsmatic.com



Thu Jun 25 2020, 03:46 PM
Mon Jun 22 2020, 03:03 PM
Tue Jun 16 2020, 05:10 PM
Sat Jun 13 2020, 09:43 PM
Thu May 21 2020, 12:44 PM
Thu May 21 2020, 01:28 AM
Wed May 20 2020, 07:05 PM
Wed May 20 2020, 11:52 AM


Guests: 94, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123