NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Dim LED

August 22, 2011
by Rocket_Man_Jeff
Rocket_Man_Jeff's Avatar

Hi all,

I've got a quick question about LEDs that can hopefully be answered quite easily. I've built on the DIP switch arithmetic tutorial given in the Nerdkit to include an LED 'alarm' that activates when the sum of the two numbers exceeds 10. The problem I've run across is that when the LED lights, it is extremely dim. The LED is being driven from the Atmel Chip's PB1 pin. My multimeter indicates proper 'no load' voltage from the pin, however with the LED the voltage drops to 1.95 (hence the dim LED). Just out of curiosity I switched things around so that pin PC3 drives the LED. Now it lights brightly. My question is why can't pin PB1 work for this? My guess is that it involves Ohm's law and some difference between the B and C pins, but I was hoping someone might be able to supply the details. I looked through the chip's data sheet as well as this forum but didn't find anything.

Any advice or info will be greatly appreciated!

Thanks, -Jeff

August 23, 2011
by bretm
bretm's Avatar

Did you configure it as an output pin using the DDRB register?

August 23, 2011
by Rocket_Man_Jeff
Rocket_Man_Jeff's Avatar

Nope, that was the problem. I had written DDRC instead of DDRB. Problem solved. Thanks for the help!

-Jeff

Post a Reply

Please log in to post a reply.

Did you know that our customers love us? Learn more...