Why does the optocoupler PC817 not work?

I connect pin 1 to +5V and pin 2 to the I/O port P1.0 of the microcontroller. Why no matter whether the value of P1.0 is 1 or 0, pins 3 and 4 of the optocoupler are not connected (measured by a multimeter)?

1 Like