High speed comparators are rather expensive and speed is what FPGAs are very good at. On the other hand, FPGAs (in my case: XC3S400) have paired differential pins in each bank that their voltages are compared ( At least I think so !). They also have Vref for single ended standards that may act as a comparator.

I want to know if I can use those differential I/O pair pins as a comparator -and if so- how should I do that ( Should I connect a vref and use single ended standards or simply connect two voltages to differential I/O pins ?)

EDITION: I tried it and works excellent !!!

  • \$\begingroup\$ If you stay within the documented voltage limits it ought to work after a fashion - precision may be more like 50-100mv than 1mv. How precise do you need? \$\endgroup\$ – user_1818839 Nov 10 '13 at 11:24
  • \$\begingroup\$ @BrianDrummond precision is not a big concern, just converting a sine wave to logic level square wave. \$\endgroup\$ – Aug Nov 10 '13 at 12:56
  • 1
    \$\begingroup\$ @Aug, that is how all the ADCs in the world work! \$\endgroup\$ – FarhadA Nov 11 '13 at 15:10

Yes you can. There are some applications notes using the differential pairs inside an FPGA as a low cost ADC.

There is a very good document describing this that you can use for your design:

Analysis on Digital Implementation of Sigma-Delta ADC with Passive Analog Components

  • \$\begingroup\$ the link does not work for me, do you have an alternative? \$\endgroup\$ – David Nov 10 '13 at 21:41
  • 1
  • 1
    \$\begingroup\$ Thank you for your guidance! I tried it and works nice. Now I have a very high speed comparator at no more cost ! \$\endgroup\$ – Aug Nov 20 '13 at 14:02
  • \$\begingroup\$ Glad it worked, I used it long time ago and was surprised how easy it was to implement a simple ADC inside the FPGA without any active components. I saved a lot of time and money doing so :) \$\endgroup\$ – FarhadA Nov 20 '13 at 21:36
  • 1
    \$\begingroup\$ That is total BS Jon, I have been using it for over a decade. Just becasue a smart ass decided to patent it does not mean it is their design, I can show you at least 3 industrial application on the market for the past 10 years or so that uses this simple ADC idea. \$\endgroup\$ – FarhadA Mar 30 '16 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.