A single output rule needs to be defined as a spec...It could be a "Priority Encoder" or a Contention Arbitrator in software when schedules selected by user collide with some round robin token ring that advances every xx minutes among the shared stack of contenders.
This would best be all be done in software.
bitcount(n): count = 0 while n > 0: count = count + 1 n = n & (n-1) return count
OR compute output Hamming Weight and correct error if not 0 or 1
(if weight>1 then fault recovery)
- Plan B
Cheap and dirty H/W IRQ if more than 2 drivers are active assuming active high out and Vdd/2 Threshold.
simulate this circuit – Schematic created using CircuitLab
Using direct output ports with a 10k Resistor array and comparator choose Vref just below when 2 outputs are high "1"
V(2)=2/(6+2) * Vdd so Vref < Vdd/4