I have made a voltage comparator out of a 5 V powered LM358N opamp and it is working just fine. But when I connect the output to digital in on a micro controller (PIC 18F4550) the voltage drops to around 0.6 V and the the low voltage is not enough to trigger the input. I have tried to remedy the problem by using the other half of the opamp as a voltage follower but with no luck.
Do you have any idea to what the problem might be?
I have made a voltage comparator out of a 5 V powered LM358N opamp and it is working just fine. But when I connect the output to digital in on a micro controller (PIC 18F4550) the voltage drops to around 0.6 V and the the low voltage is not enough to trigger the input. I have tried to remedy the problem by using the other half of the opamp as a voltage follower but with no luck.
Do you have any idea to what the problem might be?
If you've connected 5V directly to the pin, and it's configured as an output, then you may well have damaged the pin - you should connect any input via a current limiting resistor.
I agree with ericgibbs, you've most likely got the pin configured as an output, and set low.