the wired-OR connection
Wired-OR is a trick for letting many devices share a single wire without fighting each other. Normally if two outputs drive the same line and one says HIGH while the other says LOW, they short the supply together and one of them probably burns. Wired-OR avoids this by using open-drain outputs that can only ever pull the shared line down — never push it up — so they can never collide. One shared pull-up resistor holds the line HIGH; any device that wants attention simply pulls it LOW.
Picture a quiet meeting where the default is silence (the line idle HIGH, held by the pull-up) and anyone may speak by pulling the line LOW. Because pulling down always wins over the gentle pull-up, the line is LOW if ANY device pulls it, and HIGH only if EVERY device lets go. In positive logic that behaves like a logical AND of the released states (often called wired-AND); viewed by the active-low signals it is an OR — hence the names. The classic use is a shared interrupt line: ten peripherals, each with an open-drain output, tie to one wire and one pull-up. The processor sees LOW the moment ANY peripheral needs service, then polls to find which.
Wired-OR is how multi-master buses like I2C arbitrate, how multiple chips share an interrupt or a busy/ready line, and how a system reset can be asserted by any one of several sources. The honest limits: the bus can only be actively driven LOW (HIGH is just the passive pull-up, so rising edges are slow), and there is no way to tell from the line alone which device pulled it down — you need extra logic or polling for that. Still, for sharing a line safely among many talkers, nothing is simpler.
Eight sensors, each with an open-drain ALERT pin, share one wire to the processor with a single 4.7 kΩ pull-up. The wire is HIGH only when all eight are idle; the instant any one sensor pulls it LOW, the processor knows someone needs attention and scans the bus to find who.
Many can pull LOW; the line is HIGH only when all let go.
Wired-OR works only with open-drain (or open-collector) outputs. Tie two ordinary push-pull outputs together and a HIGH-versus-LOW clash shorts the supply through both transistors — a wiring mistake that can destroy them.