Electronic – arduino – Common anode 7 segment display

arduino

I've hooked up my arduino to a 7 segment display with a common anode..

Awesome schematic

At first I thought it wouldn't work at all because I was setting the pins on the cathode side of the LEDs to high.. then I discovered when I set the pins to the cathodes high the LEDs turn off..

Which is good, because I just needed to do a binary NOT (pretty much) on the output.

However, I don't really understand what's going on.. when the cathodes aren't set high, how is this the same as them being ground? Can someone please tell me what's going on here? I don't quite see how the circuit is complete..

Best Answer

This is how the output of most logic chips works. When they are high, they are connected to the 5 volt supply, and when they are low, they are connected to ground. You saw this yourself; you just didn't believe it.

Equally important is why the LED is off when the output is high. When the cathode and anode are both at 5 volts, there is no voltage difference between them, and the LED does not light. Many beginners have trouble understanding the nature of voltage.