I am trying to understand a basic comparator circuit using OPAMP. In the below circuit I have connected a reference voltage of 2.5V to inverting terminal, to a non inverterting terminal have connected input voltage varying from 0~3V. My understanding is :
1. when the voltage of VG1/VF1 crosses 2.5 output of opamp should go high until that point the voltage should be 0 but in my circuit below that is not happening, voltage is always 1V even though VG1 is less than 2.5V! what could be reason for this ?
2. when VF1 >2.5V, the output voltage should be equal to VCC/5V but it is reaching to 4V only, what could be the reason for this?
Any suggestions please?


1. when the voltage of VG1/VF1 crosses 2.5 output of opamp should go high until that point the voltage should be 0 but in my circuit below that is not happening, voltage is always 1V even though VG1 is less than 2.5V! what could be reason for this ?
2. when VF1 >2.5V, the output voltage should be equal to VCC/5V but it is reaching to 4V only, what could be the reason for this?
Any suggestions please?






