MOST VOLTAGE COMPARATORS WILL COME WITH AN 8-PIN CONFIGURATION SHOWN IN FIGURE 1.
FIGURE 1.
Vpin2-Vpin3 > 0 => Vpin6 = 5 V
Vpin2-Vpin3<=0 => Vpin6 = 0 V
TYING A RESISTOR TO A VOLTAGE SUPPLY SETS THE OUTPUT VOLTAGE AT PIN 6. DEPENDING UPON THE FPGA, EITHER 5 OR 3.3 VOLTS WILL WORK. A RESISTOR SHOULD BE CHOSEN TO MINIMIZE THE CURRENT SUNK BY THE FPGA. THE REFERENCE THRESHOLD VOLTAGE CAN BE SET USING EITHER RESISTORS CONNECTED TO THE POWER SUPPLY OR A POTENTIOMETER FOR MORE PRECISE CONTROL.
FIGURE 2.
"A woman holding a baby gets on a bus. The bus driver looks at them and says, Damn, That's the ugliest baby I’ve ever seen! In a huff the woman slams her money into the farebox and goes to the rear of the bus. The man seated next to her sees she’s agitated and asks what’s wrong. The bus driver insulted me! she fumes. That’s outrageous! says the man. He’s a public servant and shouldn’t be insulting passengers. You 're right! the woman says. I think I’ll go up there and give him a piece of my mind! That’s a good idea, says the man. 'I’ll hold your monkey. "