Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers

usb interfacing

Altera_Forum
Honored Contributor II
1,507 Views

hi everyone, 

i am new to fpga. 

but, i know how to prepare verilog file in quartus2 software. i want use the usb port in altera de2 board for tranfering ang receiving data from pc. 

but, i don't know exactly what to do. 

please help me.  

thank you.
0 Kudos
12 Replies
Altera_Forum
Honored Contributor II
623 Views

What is your system and what are you planning to do with it?  

You can write the controller yourself or you can find IP of someone who has done this for you. Alternatively you could use a softcore to handle the control
0 Kudos
Altera_Forum
Honored Contributor II
623 Views

Having your computer detect your fpga as a USB device directly is much too complicated for a beginner.  

 

Use a serial port. Your dev board might already have a serial to USB converter on it. Some boards have a serial connector. For this you will need an external serial to USB cable. If you are using a board with neither, consult with someone about finding c converter that won't damage your board when you connect it to gpio pins. This might be a level shifter followed by an serial to USB converter.
0 Kudos
Altera_Forum
Honored Contributor II
623 Views

http://www.alteraforum.com/forum/showthread.php?t=20570 

 

You should be able to piece things together just by googling for DE2 and ISP1362 to find articles similar to the link above.
0 Kudos
Altera_Forum
Honored Contributor II
623 Views

to transfer data from de2 board to pc what are the steps i have to fallow.means usb port of fpga is connected to processor through isp1362 ic. i have to programme  

 

only this ic or anything i should do to transfer data. 

please help me in this format. Is is compulsory to build a system using sopc builder. if yes,what are the components that i have to initiate in sopc builder and to correlate all of them.if no, what simple i can do.  

thank you.
0 Kudos
Altera_Forum
Honored Contributor II
623 Views

Well all you need to do is look at the datasheets and find out which pins of the USB chip are connected to which pins of the FPGA. Then, again using the datasheet, find out which of the pins should receive ones and zeroes in which order and for how long. 

You could do this in software, thus needing a processor and thus using the sopc, but you could do this with some counters and a state machine (I think), but that could be a tad more difficult. Maybe someone has done the work for you and you can find IP (use your favourite internet search engine and search for "isp1362 VHDL" or "isp1362 Verilog" depending on your language of choice).
0 Kudos
Altera_Forum
Honored Contributor II
623 Views

Be careful going down the USB rabbit hole. It is possible to do as others have described and use the data sheets and USB documentation to develop a USB device. It's a lot of work and I don't recommend it for a beginner. You will find that your project becomes a USB development project rather than whatever you really intended to do.

0 Kudos
Altera_Forum
Honored Contributor II
623 Views

I agree with Galfonz, it is difficult to make one yourself, that is why I also suggested to lopk for a description someone else has made already.

0 Kudos
Altera_Forum
Honored Contributor II
623 Views

yes it is becoming difficult for me can u tell me simple way to do data transfer bw pc and de2 board

0 Kudos
Altera_Forum
Honored Contributor II
623 Views

what have you tried? 

at which point in trying did you get stuck?
0 Kudos
Altera_Forum
Honored Contributor II
623 Views

i have tried to program the otg controller i.e. isp1362. i am not able to identify the rate with which the data coming from the usb port and give output in parallel form with which rate and synchronizing the both rates.in the data sheet it is given the how registers of otg controller can be maintained but not how data is converted as parallel output. so, can anyone help me providing the block diagram of isp1362 and its working.i know that the data is transferred in the usb.

0 Kudos
Altera_Forum
Honored Contributor II
623 Views

the block diagram is on page 5 of the datasheet

0 Kudos
Altera_Forum
Honored Contributor II
623 Views

block diagram means block body model what are the inputs has to be set and what outputs are going to come

0 Kudos
Reply