cmos to optocoupler?

Assuming that the max current is 0.5ma then the resistor needs to be

R >= V / I = 5V / 0.0005 = 10k

Much larger than 70 ohms...