Go Down

Topic: Output Pin Working Without Being Set (Read 717 times) previous topic - next topic

frenzal_dude

Hi,
why does digitalWrite(53, HIGH) turn the LED on (however it is very dim) even when I don't have pinMode(53, OUTPUT); at the top?

And why is it dim without defining it as output, and then normal brightness when I do define it as output?

Thanks in advance,
David

dc42

Because writing a HIGH to a pin configured as an input turns on the internal pullup resistor. Tha value of this resistor is about 20k.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up