ATMega328 and 7400 chips

If they outputs are tied together to the input it works. That indicates to me they are not both trying to talk at once.

I also tried a diode or gate (web says pull down at OR gate output). No joy there too.