wvmarle:
The way you have wired it - with the same power supply - there is no electrical isolation between the two. You'll have to get a completely independent power supply for the cable.Other than that it should just work - as long as you add a delay of at least 40 µs between setting the output and reading the input to allow for the optocouplers to do their thing.
That said, if all you want to do is check continuity, why not power supply + resistor + LED? A microprocessor sounds like total overkill for this.
It is over kill lol, but I have it displayed on an OLED to label open circuits or cross connections. I'm just trying to break it down see why my circuit doesn't work with the optos. Later i'll be using a battery and external cable that is x feet long with n amount of wires (preferably 100ft with 12 wires)