Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
i was never know about this since i know µC..i mean we can use output pin as ground..hahaha..it really ashame rite..but can it work for real circuit? my LED can go blow or not when output is 1?
Of course it works, it's a standard way to do it. Just be sure that the micro can drive enough current. It will of course not work in a 3V system as you are using a blue LED. Actually today with many very low power circuits and low impedance MCU i/O you can use I/O to power all kinds of stuff. If you want to drive or sink current to the MCU, that depend.
The connection you are showing works fine in real world, this is called sinking current (you can either sink or source current) so the led lights when the pin has a value of 0 and turns off when the pin is on (5v).
i think sourcing is not a better option sinking would be better.when micro controller output is high its voltage level is 5v and when it is low output is gnd if you connect 5v to led with a suitable resister (330 ohms) then cathode is connected to micro controller .
when microcontroller out put is high voltage is equals to led voltage no glow
when microcontroller out put is low voltage is difference so current is sinked in micro out put this is good for professional desing
sinking is when you have 0 at your pin (led in on) , you sink (pull) current from the led which is connected to a positive supply and you let the current flow.
If you have a led connected to the gnd then you have to source (give current ) to the led to make it light
you have to read the datasheet of your micro controller, i think avr can source or sing the same current but there are other micro controllers that can sink more current.
Also CPLD can sink more current (than it can source)
Hi,
The method is fine. Here you'd need to sink current ie pull the output to gnd instead of sourcing current ie pulling current from +v to load. Here you have the LED anode connected to the +v and the cathode connected to the PIC pin. When the PIC outputs 0, it sinks current, ie, pulls current from +v to gnd via LED, turning it on. Since you're using LED and 330R resistance, there's no question of PIC not being able to supply current as it can do so upto 15-20mA in the IO line.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.