_______________USB Interface Demo_______________

This is a _very_ simple demonstration application twinned with an
example target FPGA project to show others
how to use the USB interface board to control registers in 
target FPGA designs. 

The interface board is designed round an FTDI FT245BM device.
FTDI provide an example application but as a hardware engineer
I just wanted a really simple way of writing to and reading from
the USB port, this demo is the result.

The USB interface board was designed to be used with
the BurchED B5-X300 (http://www.burched.com.au/B5Spartan2.html)
board but can probably be used with other boards with similar
20 way headers, or by making up an adaptor cable). 

See http://www.nialstewartdevelopments.co.uk/downloads.htm
for the Xilinx Webpack FPGA project which allows the interface demo 
to be used with the BurchED board.

The entire C++ Builder 4 project is included here (all source
files are heavily commented), but if the drivers are installed 
as below, USB_demo.exe should run as a stand alone application.


When this is run quite a bit of CPU resource (85% on my machine) is 
taken updating the status registers as the software loops waiting for 
a result of a register read. For a more efficient version using 
burst reads see the downloads page of  http://www.nialstewartdevelopments.co.uk/

_______________Installing Drivers________________

To use this software the USB drivers for the FT245BM device must
be installed as follows. 

1) Download the latest D2XX direct drivers for your operating
   system from the FTDI web site at http://www.ftdichip.com/FTDriver.htm
   
2) Unzip the drivers and associated files.

3) Power up the target FPGA board so the USB interface board
   is powered.
   
4) Using a USB cable, connect the interface board to your PC.

5) The operating system should detect an umknown USB device and
   you will be asked for drivers.
   
6) Point the 'driver wizard' to where you unzipped the FTDI drivers.

The drivers should now be installed.


_______________Preparing to run__________________

This software (obviously) won't do anything until the target
FPGA has been configured with a design that will drive the
USB interface board. As explained above an example Xilinx
Webpack project can be downloaded from www.nialstewart.co.uk 
that will allow the USB interface to be connected to header
F of a BurchED B5-X300 board. A different header may picked if
the pins are re-assigned in the xilinx .ucf file.

It seems to be most reliable to configure the FPGA before running 
the software up. 


_______________Demo Operation__________________

When the USB_Demo is run the Status window should show a white
'Not Connected'. Before doing anything you must first
connect to the target device, by pressing the 'Connect'
button. If all goes well the Status window should show a green
'Connected', if there are problems a red 'Can't Connect!' is
shown. 

If problems are encountered connecting, check that the USB cable
is firmly seated and that the USB interface board is properly
powered on. If the drivers have just been installed it may be
necessary to re-boot your PC.

When a connection is established the application immediately
starts reading and updating the 10 status registers every 100ms.
The status registers are a simple bitwise 'and' of 2 config registers,
ie status1 = Reg1 and Reg11, status2 = Reg2 and Reg12 etc.
The values of the configuration registers are updates when a 
hex value is entered and the return key pressed.

A BurchED B5-LEDS module can be attached to header D and driven
via the LED and LED Read buttons at the bottom. To write to the
LEDs enter a hex value in the write box and action the write 
using the LED Write button. To read back the LED register value
use the LED Read button.


This is provided to generate hits to our web site and interest in
the FPGA and hardware design we provide. For any queries about
this please see our web site at
http://www.nialstewart.co.uk 



