Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Comparator circuit with inbuilt Fixed Reference Voltage

I need to build a comparator circuit using the FPGA with minimum external components.

A negative analog voltage will be input and has to be compared with a fixed voltage of -30mV to give a digital Output.

Could the fixed reference voltage be given by the FPGA itself ( considering it is in mV ) ?

I have just started programming in VHDL and FPGAs , therefore please help.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    FPGA is a digital device! You need an external component.

    Although I know a raw comparator operation can be emulated with FPGAs using differential I/Os in lvds mode, it's hardly applicable in your case, since you need to manage a negative voltage.

    Pay attention: a negative voltage connected to the FPGA pins would absolutely damage it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The negative input voltage could be crudely level shifted to a positive voltage with a resistive divider to VCC.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am using the Cyclone II .

    Is it more sensible to just use an Opamp as a Comparator instead or , first invert the signal and compare it using the FPGA.

    Also, then the fixed reference voltage will need to be given externally or can that be provided by the board itself?