LVDS vs. SPI
juwel
Posts: 4
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:
Comments
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
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 ?
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.
Never heard of multi-drop LVDS. Not hat I know much about it.
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.
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.
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
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.
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.
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.
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
http://www.quadrangleproducts.com/category.cfm?c=39
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.
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
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.
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.
That's a great suggestion! About as simple as it gets.
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
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.
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.
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.
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.
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.
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.