Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] LED & Button connection

2006-05-26 by newmanrf@originarea.com

Hummel,

    These guys are pulling your leg. That means they are teasing you for
not knowing any better.

    It is not eloquent to connect a led to a i/o pin without a resistor if
your pin can source or sink more current than your device can
withstand and survive. Yes it will work for a while but then either
your led or your pin driver will fail so no you should not do it.

    If your led only takes 1mA, and that seems really small to me normally
leds take 20ma (0.020A), then use the formulas you learned in school
to determine your resistor. In this case you use R=V/I where R is the
resistor resistance your looking for and V is your power supply
voltage that the CPU which you are attaching your led is attached to
one of its i/o pins and I is the current which your thing needs to run
correctly which in this case is a led that takes 20ma or 0.020A. So
the formula  3.3vdc / 0.020A gives us 165 Ohms and in my box of parts
I have 220 Ohms so I pick that and use it which makes the led work but
just a little less dim than had I had 150, 160 or 180 Ohm resistors.

    So this answers your led question and here is a web page that talks
about other related subjects which your probably going to need to know
also:
http://www.music.columbia.edu/~douglas/classes/microcontrollers/part3.html
If I were you I would start at the beginning of that class web page and
read the whole thing through, its good stuff and the basics are important.

    I hope this helped you and if you have any additional questions which
the link above did not address or you need clarification simply post
another follow up question.

Richard Newman
Pittsburgh PA USA

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.