Shop OBEX P1 Docs P2 Docs Learn Events
LVDS vs. SPI — Parallax Forums

LVDS vs. SPI

Which protocol(between LVDS and spi) is better for interfacing between ADC and Field Programmable Gate Array?If any better protocol is available please suggest! :frown:
«1

Comments

  • Heater.Heater. Posts: 21,230
    Choice of communication methods is surely determined by your choice of ADC. No good implementing something on your FPGA that is not compatible with your selected ADC. What ADC are you expecting to use?

    Then of course choice of protocol can be dictated by your application requirements. What speed does this need to work at? On board or board to board? How long is the connection. Is this "point-to-point" or do you need a daisy chain bus?

    Having said that the Linear Tech dual 16 bit 20Msps ADC looks cool http://cds.linear.com/docs/en/datasheet/2271f.pdf

    You need LVDS :)



  • My project is to implement a carbon monoxide monitoring system using FPGA. So it will be ya board to board. ..
  • Heater.Heater. Posts: 21,230
    So presumably you need to select an ADC that will cover the range of voltage you are interested in give or take some scaling. (I don't see that 2271 ADC with LVDS being useful for example, it's input range is 1 to 2.1)

    Also I guess you don't need anything like a 20Msps rate for that sensor. So you really don't need LVDS for speed.

    I'd be inclined to put a little micro-controller on the ADC board to deal with a regular ADC on one side and communicate back to the FPGA board using an LVDS driver chip like DS90LV019.
  • kwinnkwinn Posts: 8,697
    Heater. wrote: »
    So presumably you need to select an ADC that will cover the range of voltage you are interested in give or take some scaling. (I don't see that 2271 ADC with LVDS being useful for example, it's input range is 1 to 2.1)

    Also I guess you don't need anything like a 20Msps rate for that sensor. So you really don't need LVDS for speed.

    I'd be inclined to put a little micro-controller on the ADC board to deal with a regular ADC on one side and communicate back to the FPGA board using an LVDS driver chip like DS90LV019.

    Monitoring a CO sensor (or any other gas sensor) is a slow process so high communication rates are not required. Any low speed serial bus would work so why not use RS422/485 ?
  • Heater.Heater. Posts: 21,230
    RS422/485 was the first thing that popped into my mind.

    Then I thought perhaps it's better to have something like LDVS that connect directly to the FPGA with no transceiver chip required.

    As you say this application does not need the speed of LVDS.

    RS422/485 may be a better option if the distances are getting long.

  • kwinnkwinn Posts: 8,697
    Heater. wrote: »
    RS422/485 was the first thing that popped into my mind.

    Then I thought perhaps it's better to have something like LDVS that connect directly to the FPGA with no transceiver chip required.

    As you say this application does not need the speed of LVDS.

    RS422/485 may be a better option if the distances are getting long.

    Ah, didn't realize the FPGA had on chip LVDS. That makes it a more viable option. I wonder if LVDS could be adapted to a multi-drop bus configuration.
  • Heater.Heater. Posts: 21,230
    I guess it depends on the FPGA, I have not looked at many, Altera Cyclone, but I think they all had LVDS.

    Never heard of multi-drop LVDS. Not hat I know much about it.

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-02 17:57
    The BeScope that works the BeMicroCV FPGA is actually an ADC device that uses 8 LVDS channels to get the sampling rates desired for a 2=channel 100Mhz scope.

    The ADC is an Analog Devices ADC with a few other features added to make the data clean and useful.

    So downloading and actually reading the schematic will give you a very good idea of the LVDS works for high-speed ADC.

    http://parts.arrow.com/item/detail/arrow-development-tools/bescope#cEcg

    You might build a Propeller scope with a slower SPI ADC, but you won't get all the details about over-shoot and noise that the high sampling rate offers.
  • kwinnkwinn Posts: 8,697
    Heater. wrote: »
    I guess it depends on the FPGA, I have not looked at many, Altera Cyclone, but I think they all had LVDS.

    Never heard of multi-drop LVDS. Not hat I know much about it.

    Never heard of it either, which is why I was asking. Everything I have seen uses it for parallel buses, but the DS90LV019 data sheet doesn't show anything that precludes multi-drop use. The DE /RE control pins can be used for bus access.

  • jmgjmg Posts: 15,173
    juwel wrote: »
    Which protocol(between LVDS and spi) is better for interfacing between ADC and Field Programmable Gate Array?If any better protocol is available please suggest! :frown:

    The ADC is likely to make that decision for you.
    SPI is simpler, but slower. LVDS is used for higher speeds.
    ie use LVDS only if you really need the speed.

    There is a Multi-point LVDS called M-LVDS, which becomes like a local-RS485 with the lower swing of LVDS.

    https://en.wikipedia.org/wiki/Low-voltage_differential_signaling#Multipoint_LVDS
  • rjo__rjo__ Posts: 2,114
    Are you allowed to cheat?
  • kwinnkwinn Posts: 8,697
    @jmg

    Thanks for the info and the link. The resemblance to an RS422/485 driver struck me while I was browsing through the lvds driver data sheet. Seemed like it would be useful for transferring high speed data across a large board or within a smallish enclosure or chassis.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-03 10:23
    My first impression of the BeScope are that it is a very hackable 2 channel high sample rate ADC device with programmable gain.

    So if one desires to get started with LVDS and FPGA support of that, it may be a very low cost and useful entry point.

    While a lot of users have been disappointed with the BeScope Windows application that supports the board, there is no reason to NOT to just set aside all that fancy GUI nonsense and see what LVDS use of ADC adds to data capture without the pretty visual display.

    For a total of $100US you get a BeMicroCV and and BeScope with one oscilloscope probe and all the demo software. But if you don't already have a BeMicroCV, you may have to wait for one as they are on backorder. The BeMicroCA9 for $150US will work as well.

    Preliminary investigation of the BeMicroCVA9 J4 seems to indicate it lacks the I/o that the BeScope requires and ONLY a BeMicroCV will work.



    The resemblance to Rs422/485 is more than a coincidence. Pairing an inverted signal seems to enhance noise immunity, even without twisted pair wires.

    It seems we have several interfaces that are exploiting the differential principle for higher speeds. When I look at my BeMicroCV documents for designated I/o assignments, there seems to another differential pair convention available aside from the LVDS. (I need to confirm.)

    LVDS seems to be the current favorite.

    The FPGAs just seem to adapt to having two inverted I/o pins for higher speeds and provide the hardware at one end to manage either proper transmission or reception.

    At Analog Devices, I have noticed a wonderful array of demonstration boards --HDMI video, aeronautical application, medical EKG and maybe ultrasound imaging, microwave signal management.

    So it seems that the LVDS is a 'must have' to stay on the leading edge of speed. It looks to be high-speed reduced noise parallel in some cases, and high-speed serial in others. The lower operating voltage enhances the speed over the traditional RS422/485 long distance drivers and receivers.
  • Heater.Heater. Posts: 21,230
    A key point of LVDS is the "LV".

    The signal swing is only 350mV.

    When you are moving up in data rate you need faster edges, that means you need a massive slew rate if you are going from 0 to 5V in 1ns. 5 billion volts per second! Probably quite hard to drive a length cable or back plane with that.

    Low voltage of course means the LVDS standard is usable with the ever decreasing voltages that chips are running at.
  • Heater.Heater. Posts: 21,230
    kwinn,
    I wonder if LVDS could be adapted to a multi-drop bus configuration.
    Turns out you are in luck. Looks like LVDS can handle multi-drop out of the box. You will need to take care to terminate the line correctly.

    Multi-point can be done with devices that support the M-LVDS spec. As mentioned above.

    The Fairchild document on LVDS is worth a look:
    https://www.fairchildsemi.com/application-notes/AN/AN-5017.pdf
  • Heater.Heater. Posts: 21,230
    These guys are claiming they can push LVDS up to 15 feet with their cables. Can it be so:
    http://www.quadrangleproducts.com/category.cfm?c=39
  • Attractive as LVDS to some serious applications, it seems to be pushing us into buying everything pre-built and away from DIY circuit boards.

    FPGAs with ball arrays require multi-layer boards. And I am not clear how critical board design is to LVDS, but it is likely to be more sensitive to design of good board.
  • Heater.Heater. Posts: 21,230
    With the ever vanishing size of components that becomes more and more true.

    All is not lost yet. The Texas SN65MLDV206 is an LVDS transceiver chip that supports mult-point connection and looks like it comes in a package one could buld a board for and solder by hand.
    http://www.ti.com/lit/ds/symlink/sn65mlvd206.pdf

    FPGA's are pig in that respect.

    How critical the board design is depends on how fast you want to go. If you look inside an digital oscilloscope you might see 8 pairs of differential signalling carrying data from the ADC to the capture FPGA. Those pairs snake around and can fold back on themselves so that all 8 pathways are the same length and all the bits arrive at the same time. No doubt those pairs are impedance controlled as well.

    But all is not lost here either. One could probably get a couple of signals off of a DIY board and onto another using scrap SATA cable. HDMI cable.

    I'm starting to think the P2 should support LVDS :)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-03 10:34
    CORRECTION ---
    Above I may or may not have mentioned that I had doubts about the BeMicroCVA9 working with the BeScope board.... my mistake.

    Herein is an excerpt from the BeMIcroCVA9 brochure. I am much relieved as I damaged on much needed i/o pin on my cheaper BeMicroCV A2 board, but have a BeMicroCVA9 in reserve.

    BeMicro CV A9 is compatible with the Arrow BeScope digital
    oscilloscope, SDRstickTM SDR front-end boards, and the Terasic MTL LCD
    module. For a complete list of products compatible with BeMicro CV board,
    see the BeMicro CV Partner Pack at

    https://parts.arrow.com/item/detail/arrow-development-tools/bemicrocva9

    I will correct my previous entry. But this makes it possible to immediately buy a BeScope with a working FPGA board as the BeMicroCVA9 is in stock. The cheaper BeMicroCV is on backorder at this time.

    There might be other LVDS goodies listed in the link provided above. Arrow Electronics web pages tend to confuse me.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-03 10:49
    I know the discussion is LVDS versus SPI, but if you are going to use an FPGA and don't need the LVDS device -- there is a third choice.

    Just create your own ADC in Verilog or VHDL

    Sampling rate appears to be limited to 50Khz, but I am not sure if that is partially related to the FPGA devices included in the example.


    So far I have only found a good explanation from Lattice, but it should migrated to Altera devices as well.
  • Just create your own ADC in Verilog or VHDL.

    That's a great suggestion! About as simple as it gets.

  • kwinnkwinn Posts: 8,697
    ..............

    Just create your own ADC in Verilog or VHDL

    Sampling rate appears to be limited to 50Khz, but I am not sure if that is partially related to the FPGA devices included in the example.

    That really is a good idea, and 50KHz is more than adequate for gas sensors that take seconds for the reading to stabilize. Only problem in this case is that the sensor is not on the FPGA board. Sending analog signals over long cables brings up the noise issues. Still, it could be a viable option.
  • 7 series FPGAs(eg. ZED Board) contain their own ADC. So how about interfacing between that adc and Filter which i will be needing to build?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-03 14:50
    kwinn wrote: »
    ..............

    Just create your own ADC in Verilog or VHDL

    Sampling rate appears to be limited to 50Khz, but I am not sure if that is partially related to the FPGA devices included in the example.

    That really is a good idea, and 50KHz is more than adequate for gas sensors that take seconds for the reading to stabilize. Only problem in this case is that the sensor is not on the FPGA board. Sending analog signals over long cables brings up the noise issues. Still, it could be a viable option.

    I wasn't aware that you wanted the sensor to be on the end of a wire.. not next to the FPGA.

    How much distance is critical. If it is a lot, like 10 meters or more; a senso with a small microcontroller attached that converts to asynchronous serial and is attatched two a full duplex RS422 driver/receiver pair may be optimal.

    SPI might be adapted to distance with a microcontroller by using RS422 drivers and receivers - but I have never tried it. A BasicStamp might even be adequate.

    And i have not yet found a discussion of LVDS over cable. Seeing as mention has been made that all lines must be exactly the same length in order to work properly, if could be difficult to deploy. Of course, an LVDS ADC and a FPGA as a converter to asychronous might be done if required. But that does seem to be the case.

    ========================
    ZED Boards seem pricey. The cheapest is $365.00 USD or a bit more. And they go up to $36,645.00USD. I am still on my FPGA training wheels, so I will pass.
    http://zedboard.org/sites/default/files/product_briefs/ZedBoard Brochure (English).pdf
  • Heater.Heater. Posts: 21,230
    I have seen a spec somewhere that says LVDS is good for up to 15 feet. As mentioned above. More normally we have SATA and HDMI which is basically DLVDS over cable.

    That thing about keeping lines all the same length was regard to the multiple differential pairs you find in things like scopes. Basically a parallel bus created out of 8 or so LVDS pairs.



  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-04 07:01
    I am beginning to feel that some speed demon is going to have to just run some bench tests to prove what can be done with all the alternatives we have mentioned.

    It is the same old situation. The longer the cable, the more likely you have to slow down a bit. SATA cables seem nice and tidy, but those HDMI cables are thick and hard to bend.... and there are a bunch of different cable ends.



  • Heater.Heater. Posts: 21,230
    Oh boy, sounds like a challenge.

    HDMI is a bugger. Thing is they have a whole bunch of channels in there and perhaps 29 conductors: http://pinouts.ru/Video/hdmi_pinout.shtml

    That is far removed from a simple Tx pair, Rx pair and GND we might need.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-09-03 18:05
    HDMI annoys me deeply. I had to buy a HDMI to VGA converter for my Cubieboard (yes, cheap board requires expensive adapter or cable). But I first tried twice to get the HDMI to directly work on the HDMI ports on both my existing monitors that have HDMI ports as well as VGA.

    Back and forth to the store, back and forth to websites, and nothing worked. The first HDMI cable just would not plug into any monitor. The second one did plug in, but no video. The HDMI to VGA converter works fine.

    http://www.hdmi.org/installers/insidehdmicable.aspx

    All this nonsense was just in hope of getting to see what HDMI actually looked like on my two monitors. But I am beginning to suspect it would just look the same as the VGA.

    Just another day in the trenches of trying to find out if technology is progressing or just shaking us down. Never did return the two HDMI cables. (and an adapter that I forget to mention.) Taiwanese stores often refuse returned merchandise.. you bought it, it's yours.
  • Heater.Heater. Posts: 21,230
    It's possible that your CUBIE and HDMI cable were just fine. When I first connected a Pi to and HDMI monitor it did not work. Turned out the Pi did not understand what this monitor was announcing as its available resolutions. Took a bit of hacking of an HDMI config file on the Pi to get tell it what to do. Bingo it worked.

    Strangely enough I now have a PC and a monitor both with VGA and HDMI. I use VGA. Buggered if I can tell any difference using HDMI. The VGA has the advantage of being a nice flexible cable and it screws into place ensure I never accidentally kick out out of it's socket.

  • kwinnkwinn Posts: 8,697
    All this nonsense was just in hope of getting to see what HDMI actually looked like on my two monitors. But I am beginning to suspect it would just look the same as the VGA.

    Just another day in the trenches of trying to find out if technology is progressing or just shaking us down. Never did return the two HDMI cables. (and an adapter that I forget to mention.) Taiwanese stores often refuse returned merchandise.. you bought it, it's yours.

    The hdmi output from my Odroid board looks pretty darned good on my 42 inch TV and the 23 inch monitor. As for whether technology is progressing or shaking us down....it's doing both.

    Re: "I wasn't aware that you wanted the sensor to be on the end of a wire.. not next to the FPGA."

    It is juwell's project and question. If It was me I would use plain old serial data and a 3.3V RS422/485 driver over a twisted pair. For a CO2 or any other gas detector even 300 baud is more than fast enough, although I would use a higher speed.


Sign In or Register to comment.