Thanks , I now study well how it work.See post#16
View attachment 180610
Thanks , I now study well how it work.See post#16
View attachment 180610
Maybe I was not clear, I apologize, but maybe there is a problem with my English.The specification is written for the input voltage in relationship to Vcc-.
If you Vcc- is ground you should not have an input at -3.3 volts. It should not be more negative than -.3 volts.
If your Vcc- is -3.3 volts you would be fine. This is why people are asking what the negative supply voltage is.
/
This is precisely my problem: to prevent the comparator output from being less than zero, because the output must go to an FPGA that does not accept values lower than 0VoltIf you power the comparator from 3.3 V and supply 0 V minus the power supply, you will have logical output levels. If you supply the comparator with bipolar power (+3.3V and -3.3V), the value of "zero, low level" may be negative. This is not a problem for the one used in my example, as the output of the comparator emitter can be connected to the common wire. But with other (not so flexible in use) comparators it may not be so and a negative "zero" may be a problem (you can't control the microcontroller for example)
Gee, seems like this issue was mentioned much earlier in the thread -- like in Post #6:This is precisely my problem: to prevent the comparator output from being less than zero, because the output must go to an FPGA that does not accept values lower than 0Volt
There are several simple ways to do this. A simple resistor and clamping diode will prevent the input to the FPGA from going more than a diode drop below it's negative supply. Use a Schottky diode for best results. This approach may not be suitable if you are working with high speed signals. How fast is your system running?Though it would also mean that the output would be down around -3.3 V. If you need the output to be around 0 V, then you need to do something to shift or clip it.
A diode like a BAT 54 or BAT 41 would work. Maybe a resistor of 33K or so.Thanks for the reply.
I'm using a cyclone IV but I don't think the signals will ever have a frequency greater than 5 - 10 MHz.
Could you recommend a suitable diode, please?
In addition to the diode, in the meantime I also thought of using a transistor.I think this solution can be faster and safer, what do you think?(I attach diagram to understand what I mean)
Can't you already do this with the LM311 style of comparators? They give you access to both the collector and emitter of the output device. The power pins and the inputs can run from +3V3 to -3V3 and you can reference the output to 0V at the emitter and [whatever] via the collector pull-up resistor. They allow all the way from the negative rail to the positive rail as input range. Is there some reason why that type of device won't work, here?I've shown you a way to shift the input signals to minus. But the comparator used in my example is not very suitable (whatever the simulation shows). You need a comparator that allows for a full range of input signals (from 0V to VCC). And you can use a n-channel transistor with a pullup resistor to get a zero level. However, the inputs must be reversed (due to additional inverting).
@to3metalcan:Can't you already do this with the LM311 style of comparators? They give you access to both the collector and emitter of the output device. The power pins and the inputs can run from +3V3 to -3V3 and you can reference the output to 0V at the emitter and [whatever] via the collector pull-up resistor. They allow all the way from the negative rail to the positive rail as input range. Is there some reason why that type of device won't work, here?
The datasheet I have says the inputs can go from "ground" (the negative power rail) to Vcc or +15V (whichever is less.) Seems like it'd be well in the clear, but even if it wasn't, a simple resistor divider should take care of that. The OP mentioned signals in the MHz range, so I'm guessing he is converting digital output from one device to the level accepted by another, not simply providing fixed voltages via a switch, though his test schematic shows that.@to3metalcan:
Your interpretation of LM311 operation is correct. However, there is a problem: the inputs of the LM311 are not rail-to-rail. Therefore the LM311 cannot accept the +3.3V and -3.3V signals provided via the rotary switch.
@mos_6502:
Perhaps you can explain why you use such complicated circuitry to provide nothing more than fixed voltages of +3.3V and 0V to your FPGA? I am puzzled as to what you are really trying to accomplish--surely more than that? Your MOSFET solution can (as can others suggested) work provided your comparator output can swing close enough to the +3.3V power supply to allow the MOSFETs to turn off and your comparator allows rail-to-rail input voltages...but simply connecting voltages directly from a switch(s) to the FPGA inputs can work too.
The datasheet I have says the inputs can go from "ground" (the negative power rail) to Vcc or +15V (whichever is less.) Seems like it'd be well in the clear, but even if it wasn't, a simple resistor divider should take care of that. The OP mentioned signals in the MHz range, so I'm guessing he is converting digital output from one device to the level accepted by another, not simply providing fixed voltages via a switch, though his test schematic shows that.
@to3metalcan:The datasheet I have says the inputs can go from "ground" (the negative power rail) to Vcc or +15V (whichever is less.) Seems like it'd be well in the clear, but even if it wasn't, a simple resistor divider should take care of that. The OP mentioned signals in the MHz range, so I'm guessing he is converting digital output from one device to the level accepted by another, not simply providing fixed voltages via a switch, though his test schematic shows that.
@to3metalcanYou're right, that is in the recommended operating conditions (as per the attached screenshot.) I learned something! However, in max allowable operating conditions, they do say it can deal with rail-level inputs. The fact that it's not "recommended" I suspect just means it slows the device down slightly (probably saturates something that isn't meant to be) because I can tell you from experience I've been running them on 5V rails and slapping the inputs with 5V levels for quite awhile, with no discernible trouble! Then again, I'm not usually running them at extremely high speed. However, there are other similarly-designed comparators that use CMOS tech that ought to be able to handle low-voltage rail-to-rail input and allow a ground-referenced output. The LT1011 is one. I don't know if it's available in the TSOP package the OP designated, though. Hmmm...
by Jeff Child
by Duane Benson
by Duane Benson
by Jake Hertz