March 25, 2010

This package contains Windows support software for the BioSemi USB based
data acquisition system.  This software uses the 32 bit Microsoft
WinUsb2 kernel mode driver available on Windows7-32, Vista32 and
XP32.  The Labview_DLL.dll contained herein makes appropriate
user mode calls to this driver to implement the BioSemi acquisition API. 

Windows Installation
====================

When the receiver's cable is plugged into the computer's USB
slot, a kernel mode driver must be chosen to handle the I/O.  
On XP32, Vista32 and Win7-32 this driver can be either the BioSemi or
the Microsoft driver.  On Win7-64 and Vista64 the Microsoft driver must be
used.  Here's the usual sequence of displays and what you should
chose.


XP32 (i.e. XP)
----
Open the Control Panel
	Select: System, Hardware, Device Manager
Plugin the receiver's USB cable.

If the Found New Hardware Wizard window doesn't appear, right click
on the existing driver listed (you may have to expand the "Devices Class"
entry in the list), select the "Update Driver" menu item and the
Hardware Update Wizard window will appear.  If there is no existing
driver, double click "Add Hardware" in the Control Panel.

Make the following selections:

	"Can Windows connect to Windows Update to search for software?"
		Select "No, not this time".

	"What do you want the wizard to do?"
		Select "Install from a list or specific location (Advanced)."

	"Please choose your search and installation options."
		Select "Don't search. I will choose the driver to install."

	"Select the device driver you want to install for this hardware."
		Select a driver from the list shown or choose "Have Disk".

	"Install From Disk"
		Use "Browse" to select the directory with the INF file to use.


Vista32, Win7-32
----------------------------------
Open the Control Panel
	Select: Device Manager
Plugin the receiver's USB cable.

If the wrong driver is installed for this device, right click on the
existing driver listed (you may have to expand a class to see the driver
entry in the list), select the "Uninstall" menu item and a "Confirm
Device Uninstall" window will appear.  Select "Delete the driver software
for this device" and click "OK".  Pull out the USB cable and re-insert it.
If there is no existing driver, double click "Add Hardware" in the
Control Panel.

Now you should see the following sequence of displays:

"Windows needs to install driver software for your Receiver01"
	Select "Locate and install driver software (recommended)"

After a short pause while it searches Windows Update you get:

"Insert the disk that came with your RECEIVER01"
	Select "I don't have the disk. Show me other options."

"Windows couldn't find software for your device."
	Select "Browse my computer for driver software (advanced)"

"Browse for driver software on your computer"
	Use "Browse" to select the directory with the INF file to use.

"Windows can't verify the publisher of this driver software"
	Select "Install this driver software anyway"


Testing
=======
Go to the "C-code" subdirectory - "USB_drivers_Windows_32bit\Developers_kit\
C-code" - and run the program "Labview_DLL_SyncTest" using
this command:

Labview_DLL_SyncTest 0

This program checks that the 0xffffff00 sync words appear in all the
right places in the input stream.  It stops with a message if they don't.

There can be 3 command line parameters for this program:
- ring buffer size, in 512 byte units,
- ring buffer extra bytes beyond the 512 multiple, and
- time to run.
They can be in any order or left out completely.

Ring buffer size must start with a 'b' or 'B' and is given in units
of 512 bytes.  The default if not given is b65536 for 32 Mbytes.

Ring buffer extra bytes must start with a '+' and must be a multiple
of 4 bytes.  The default if not given is +0 for no extra bytes.

The time to run is in seconds.  The default if not given is 600 seconds
(10 minutes).  If given as 0 (as shown above) there will be no time limit.
 
Hitting any key when the program is running will stop the test run.


Labview_DLL.dll Usage Notes
============================

1. On Win7-32 and Vista32 install the 32 bit BioSemiWinUsb2.INF file. 
The 32 bit support software included here (i.e. "USB_drivers_Windows_32bit\
Developers_kit\C-code\*") can be used on both 32 and 64 bit Windows systems.

2. The ring buffer can be any size as long as it is a multiple of 4
bytes.  When the size is a multiple of 512 bytes, the driver/library
will do RAWIO which gives slightly better performance.  Note: the
Linux version supports only multiples of 512 bytes.

3. Some performance improvement may be gained by using the library
parameters explained in the file "Developers_Tuning_Info.txt".
