Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

FPGA interfacing

Status
Not open for further replies.

cs342

New Member
Hi,
I am currently working on my final year and I am trying to interface an FPGA via UBS. I am having some problems tho...all the documentation I have looked at is really confusing. I am using an ALTERA FPGA however I am considering using a XILINK one because I have been told they are easier to use. Also I have only just started using FPGA's :s

Any help would be appreciated!

Thanks
 
A good way to interface USB(i believe that's what you meant) to an FPGA is to either:
COPY the circuit from a development board schematic
BUY a development board.
That said, here' s a fragment of a schematic of an Altera EP3C25 connected to an FTDI USB-chip.
FPGA_2_USB..JPG
.. this was used to down-/upload data to to a test-jig at 8MBytes/sec with a simple program that addressed it as a serial-port.

There will be a learning process for either X or A: best to choose based on what your fellow-students and instructors are doing.
 
Use caution if choosing a development board. My Spartan board has a USB connector, BUT it's dedicated to that JTAG programming resources, and AFAIK, cannot be used for general USB communications.
 
If you want USB capability "out of the shelf" look at the DLP-USB245M USB FIFO module (which uses an FTDI chip). It has a very user friendly parallel interface. I use one in one of my projects and I control it via a Xilinx CPLD (ancestor of FPGA !!).
 
thanks for your replies! I have decided to use the rs-232 serial port to interface the altera DE2 board. I am programming the FPGA in verilog, and using hyper link to send a text file to the FPGA. However i am having problem in receiving the file back from the FPGA to the PC. Can anyone help me in this?

The code i used to program the FPGA:

module serial1
(
input UART_RXD,
output reg UART_TXD

);

buf(UART_TXD, UART_RXD);

endmodule

I am just trying to send a file and recieve the same one again. I am sure the file is being received by the FPGA because the LED on the RX flashes everytime i send some thing but i cant receive it!! Any help?
 
try this in serial 1

assign UART_TXD <= UART_RXD;

This shoud produce a loopback, and you should see what you type on hyperterm show up on the terminal. If you have the options set to see what you send, then the message will show up twice.

I'm doing the very same thing with my Xilinx board. You're a step ahead of me though. I'm not working on it because I've been doing my taxes, and today I have to take care of my overgrown lawn. Hope to get back to this in the next couple days.

BTW, I intend to use a verilog UART that I downloaded from opencores.org. I am planning on posting the results when I have some.
 
Last edited:
try this in serial 1

assign UART_TXD <= UART_RXD;

This shoud produce a loopback, and you should see what you type on hyperterm show up on the terminal. If you have the options set to see what you send, then the message will show up twice.

I'm doing the very same thing with my Xilinx board. You're a step ahead of me though. I'm not working on it because I've been doing my taxes, and today I have to take care of my overgrown lawn. Hope to get back to this in the next couple days.

BTW, I intend to use a verilog UART that I downloaded from opencores.org. I am planning on posting the results when I have some.


Thanks for your help! I managed to get it working fine.
Hope yours goes well!
 
hey...sry i keep asking questions but i need a bit more help :s
Have you managed to send bit streams over the rs232? I am trying to figure out how to start writing the code to send bit streams over but i am having major problems! i am still trying to familiarize myself with the language...
Any help you can give me will be of a lot of help!!
Thanks
 
It should be pretty simple. Create a parallel load and serial shift out register. Append and prepend the start/stop bits and any other handshaking bits ( better decide on the protocal before doing this. Are you gonna use hardware control??? ) Shift out the serial data to using the register you created. Make sure you use the correct BAUD rate, the FPGA PLL's might be very helpful here. And that's pretty much all there shoud be to it. Like I said however, you are a step ahead of me still.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top