When the 339 is setting an output low, the output is only dropping to about 2.3v, and not 0. Not low enough for the 74LS240 to recognize it as low. If I short the cathode of an LED to GND, then the 74LS240 works as intended, obviously.
At first, I realized that my pull-up resistors (RN5) may not even BE needed, thanks to the LEDs. However, removing it from the circuit drops the output to about 1.5v.
The LEDs have a forward voltage of 2v, and use 20mA. (Part: https://www.digikey.com/product-detail/en/kingbright/APT1608SYCK/754-1124-1-ND/1747841 )
Am I trying to overdrive the LEDs? Would increasing the resistance of RN4 help? And is RN5 even necessary?