I want to get information about the connection of two fpga via usb,But I only found information about usb drive and the connection of two fpga to other methods like spi etc ...
The USB protocol is rather complex. Theoretical you could put it in an FPGA but it would become very, very big. It is more efficient to add a processor, either internal or external to the FPGA to run the protocol.
Look for FPGAs with embedded processor. They often come with built-in USB, Ethernet and DDR controller.
Related
Is it possible to capture a USB data from a usb communication between two devices by just tapping the lines and giving it to another controller with USB modules ?
To explain better A is communicating with B . C knows what interface they are using and in what endpoints they are communicating . Intension of C is to just listen what they are communicating. And C don’t want A and B to know that he is listening to their communication.
Thank you
In principle, it is possible.
It depends on the features of the USB module of the microcontroller. If it has something like a pure "listener" or "tap" mode, it should work. But I'm not aware of any USB module capable of this. This means nothing as there are so many different microcontrollers.
What you are asking for is basically "is it possible to build USB hardware analyzer/sniffer". As there are sniffers on the market, the answer to this question is yes.
One possible approach (if you are not that much interested in the physical layer) is to use USB PHY (e.g. Microchip USB3343 for USB 2.0) in passive mode. In such scenario the USB PHY does translate the USB signalling to ULPI. Then you can process the ULPI data to extract the USB packets. If you are interested in High Speed (or faster, e.g. USB 3.0 SuperSpeed) then pretty much the only viable approach is to use FPGA to do the processing.
If you are interested in seeing what kind of effort is needed to achieve USB 2.0 sniffing in hardware using the USB PHY approach, then check out the OpenVizsla project.
I'm trying to configure/write VHDL code that would let me output or input data from the USB port on a Basys3 FPGA board. Problem is I have yet to found any threads or questions that talk about this topic.
The nearest thing to an answer I've found is this:
Provide input data to FPGA using USB
and it does not contain what I'm looking for.
Any clues anyone¿?
The Basys3 board has a usb-uart bridge chip as described in the reference manual. This will appear to a PC (or any device with a usb host and the appropriate usb-serial drivers) as a virtual com port. Sending data to and from a PC com port is quite easy.
You will need a uart implementation on the FPGA. There are lots of example designs on the web. One way is to implement a soft core microblaze processor with a uart peripheral in the FPGA. This example looks like it includes foundation for the functionality you desire.
The simplest implementation from the PC side is using a terminal program such as putty, Tera Term or realterm. Most languages include com(serial) port libraries or bindings. This type of interface tops out at a raw bandwidth of around 3-12Mbits per second depending on the drivers and implementation.
Read the manual for the Basys 3 board. It will explain how you can interface with USB devices plugged into the USB port. Be warned, however, that your options are pretty limited.
Short version: if you plug in a USB mouse or keyboard, they will be exposed to your design as an emulated PS/2 device. USB storage devices can be used to configure the FPGA. Other devices are not supported.
I have a custom ps2 keyboard(8x8 matrix) interfaced with AT89C51ED2 microcontroller, now I need to change it to USB interface. I have been studying about the basics of USB HID class communication(USB HID class specs, USB complete, Beyond logic) and have come to know little bit about the theory behind it.
But I am not able to understand the firmware part, I read a demo keypad application by Microchip which had given a sample source code, but I am not able to understand in the code how data(key pressed) is sent to the IN endpoint and how the host reads that through polling. I know that endpoint is a buffer from which data is sent to host, but Is it one of the registers of the micro-controller and how do I use it in my code?.
And I have been searching the suitable micro-controller with USB support, but no supported demo's are available, any suggestions will be helpful
The AT89C51ED2 datasheet does not mention hardware support for USB, so the answer is no: an endpoint does not correspond to a hardware register. Instead, an endpoint would refer to some software buffers in the RAM of the chip, and some data to keep track of the endpoint's state. Every bit of every USB packet must be handled by the firmware of the device, and endpoints are an abstraction that live entirely in the firmware of your device.
Note: I am assuming that the keyboard doesn't have some kind of USB interface chip, and that the data lines of the USB cable connect more-or-less directly to the microcontroller.
If you can't find the source code for the keyboard, you might look into using an open-source AVR software USB implementation. Here are some useful links:
https://www.obdev.at/products/vusb/
http://www.fischl.de/usbasp/
Please note that you are undertaking an advanced project, and if you are not familiar with AVRs, USB, microcontrollers, reverse engineering, and embedded development/debugging, it might be useful to start with something simpler first.
I'm a newbie in embedded programming.
Now I'm trying to understand a datasheet for Telechips 8001S.
What is the difference between SPI(Serial Peripheral Interface) and GSB(General purpose Serial Bus)?
Thank you.
google is your friend...
Telechips GPSB appears to be their spi implementation (and one or more other serial protocols) master or slave with dma. Spi is the protocol, call it a standard or not but there are a large quantity of devices that support it, GPSB is the logic/peripheral in the chip that you can use to connect to spi masters or slaves (you can always bit bang on gpio of course). Looks to have dma and probably other features.
I didnt find the 8001 nor the 8010 docs, but did find one that was enough to understand.
On some ti products you may find the USI, universal serial interface, the name for their uart, spi and i2c peripheral.
Some ftdi chips have MPSSE, which can be programmed to implement quite a few protocols, jtag, spi, i2c, mdio, roll your own.
Other vendors may simply call the peripheral UART, SPI, I2C.
Its just a name that marketing or engineering or a combination of the two at that company chose for the peripheral within the chip.
I am working on Xilinx Spartan 3E platform, using this development board:
http://www.xilinx.com/products/boards-and-kits/HW-SPAR3E-SK-US-G.htm
My program operates on certain data and then provides output. I wish to transfer the input signals externally. The input data is a stream of 8-bit signals.
So, how do I send the input signals from my laptop to the FPGA via USB? Does Xilinx support this or is there standard software to do this?
Thanks.
It sounds like you are describing a uart more than a native USB interface. You can get a USB to logic level serial adapter that will let you easily transfer data to and from a Pc at up to 921.6k baud. A uart/serial port is easy to implement in the Fpga and PCs are easy to use with serial ports.
Here is the cable:
http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
If you have a development card it is very possible this type of interface is present.
On the software side you can use your programming language of choice as if it was interfacing with a seal port or use a terminal program like hyper terminal or Download teraterm http://ttssh2.sourceforge.jp/
Updated response:
100Hz is not a hard interface to make. At that rate you should use the serial interface if at all possible. The board you referenced has 2 full RS-232 connections. At that point you only need a way to connect that to your computer. If you have a PC with RS-232 connectors you only need a cable if you have a newer computer without you need a RS-232 to USB translator cable (like this one: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=768-1014-ND or google rs232 usb). This will give you a virtual com port on the pc to interface with the previously mentioned terminal programs or your custom software.
Update 2:
on the resource tab of the development board page you linked to there are several UART based fpga designs that you should be able to use as a starting point.
i.e. the "PicoBlaze Processor SPI Flash Programmer".
That board doesn't provide easy access to the USB interface from the FPGA as far as I can tell. It's just for configuration and debug.
Some of the newer boards and tools do allow something called hardware-in-the-loop testing where the simulator can upload data to the FPGA, wait it to calculate the results and then pull the data back. This is relatively common when using Xilinx's System Generator product as the simulations can be really long.
But I think with that board you'd be better off using the on board RS232 port to get data to and from the board. You will have to build the infrastructure to do it yourself though.
This may also give you some ideas:
http://www.1pin-interface.com/