Re: AVR and dim LEDs.
- From: "Mike Warren" <miwa-not-this-bit@xxxxxxxxxxxxxxxxxxx>
- Date: 03 Dec 2006 00:59:57 GMT
artswan wrote:
Oh, one final note that I forgot to mention (silly me!), I connected
the LED, both with a series 220 ohm resistor and without, from Vdd to
the output pin, so as to have the AVR chip sink current rather than
source it, and there was no longer any visible blinking of the LED.
You are risking damage to the LED and/or the chip by connecting it
without a resistor.
Anyway, it looks like your problem is that you haven't set the pin to
output mode.
for example if it was pin 0 on port C you would use:
sbi DDRC,0
When the data direction bit is low the port bit just switches on or off
a pull-up resistor. That would explain the symptoms you are getting.
--
Mike
.
- Follow-Ups:
- Re: AVR and dim LEDs.
- From: Arlet
- Re: AVR and dim LEDs.
- References:
- AVR and dim LEDs.
- From: artswan
- Re: AVR and dim LEDs.
- From: artswan
- AVR and dim LEDs.
- Prev by Date: Re: AVR and dim LEDs.
- Next by Date: Re: AVR and dim LEDs.
- Previous by thread: Re: AVR and dim LEDs.
- Next by thread: Re: AVR and dim LEDs.
- Index(es):
Relevant Pages
|