I am using a lm324 voltage compatitor for a project of mine.
The output of the comparitor is to be connected to a microcontroller.
So the power supply i gave to it was +5v to 4th pin and ground to 12th pin.
Will the ic work if i give ground to 12th pin instead of -5v.
324 opamp CommonModeInputRange is supposed to include ground, it's a single-rail opamp. The output swings right down to 'ground' too, according to datasheet. In practice it's about a volt when sinking 1 mA, plenty low enough for a logic 'L'.
Yeah, just connect it across the microcontroller's supply, and then you'll know the output swing is within the uC's input voltage range.
Note the non-ideal behavior. It works with one input at ground, but it is slow and it has some offset. The common-mode range includes ground at the bottom end, but only goes to about +3V when operated on single 5V supply.
Note the non-ideal behavior. It works with one input at ground, but it is slow and it has some offset. The common-mode range includes ground at the bottom end, but only goes to about +3V when operated on single 5V supply.
the supply voltage is +5v so practically the output voltage will be +3.8v.
The reference voltage is +1v.
So after 1v i would read as 1 logic and below 1v i would read as 0 logic.
So are you saying you are interfacing a 'comparitor', via a comparator to your 89C51?
I'm confused now! Normally you connect into the comparator input, a transducer of some kind (what I was asking about). But I've not heard of a comparitor connected to the input of a comparator. What kind of signal does a comparitor provide to the comparator?
Maybe you don't need a comparator at all and you can just send signal to the 89C51's A-to-D converter instead, and do the comparatoring in software?