LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary data acquisition from FPGA using serial port

Hi:

I am trying to acquire data from an FPGA, which I have used to control and collect data from discrete components(OP-amp, A/D converter etc..). Now I would like to collect this data in a file to the PC for further analysis. I am using Spartan-3 FPGA (starter kit) from Xilinx. I have 1280 bits of data in the FPGA. (64 20-bit words).

How should I configure Labview to accomodate this feature in my project. How should I send/receive data using the COM port in my PC to the FPGA. FPGA has an RS-232 interface. What signals should I send through the different pins in the RS-232 from the FPGA. Any help in this area is very much appreciated.

Thank you very much,
Clement Joseph.
0 Kudos
Message 1 of 4
(3,350 Views)
You can use VISA in LabVIEW to communicate over your RS232 port. RS232 has a transmit line, and a receive line that are both referenced to ground. These three lines are all you really need to use if you want to send and receive data.

I'm not familiar with that FPGA, but once you send your data from your FPGA's RS232 port you can read it back in LabVIEW by specifying the number of bytes to read in a VISA Read.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 4
(3,332 Views)
Hi Shawn:

Thank You very much for your reply.

What all do I need to specify in the VISA?

How will the VISA recognize that the FPGA is sending data or ready to send data. Should the FPGA not send a data_enable signal which tells the VISA that the data is ready? Also should there not be a clock which synchronizes both the FPGA and VISA? Please advise/explain. I am very new to Labview interfacing.

Thanks,
Clement Joseph.
0 Kudos
Message 3 of 4
(3,322 Views)
VISA is just an API that allows you to communicate over RS232. With VISA you will open a session to your serial port, then write and read from you serial port, and finally close your serial port. Depending on how you setup your system you may want to use a handshaking scheme to control when the data should be transferred. There is no need for a clock because both serial ports will already use their own clock. Perhaps the following link will give you a better understanding of RS232:

Serial Communication Overview

I would also recommend reading the "Serial Communication Starting Point" article linked at the bottom.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 4 of 4
(3,310 Views)