Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Trumpkin on August 04, 2008, 11:23:31 AM
-
Is port d6 the right pin to connect an LED to if I want to program the LED?
-
you can connect an LED to any port
-
So you can plug an LED into a port d, port b or port c? I thought it had to be port D.
-
I don't know what you mean by "program the LED". You pass current through an LED and it lights. Since the mega8/168 can safely source or sink up to 40 mA with its digital I/O pins, it can light standard LEDs (which typically have good brightness at anywhere between 2 and 20 mA).
Connect your LED to any digital I/O pin you want (don't forget to put an appropriate resistor in series with the LED) and then drive that pin high to light the LED (assuming the other side of the series circuit is connected to ground). Why would you think that you could only use port D pins?
- Ben
-
You pass current through an LED and it lights.
that's what I meant when I said "program the LED".
-
Yeah I meant to say what Ben said but I didn't use as many words :P