- Published: Sunday, 25 July 2010
- Written by Jon Chandler
Most micro-controller projects use port pins for outputs, often to turn on an LED or motor. When using a port pin as an output, we usually think of two states. A low state means the pin is connected to ground, while a high state means the pin is connected to +5V. Depending on how a LED, motor or other component is attached, "on" and "off" may correspond to either high or low. As shown below, if an LED is connected between a port pin and ground, a high state turns the LED on. Conversely, if the LED is connected between V+ and the port pin, a high state turns the LED off.
Discuss this article in the forums (3 replies).