Skip to content

Small improvements, and compatibility updates to the official release of the Intan RHD2000 USB Interface Software

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.LESSER
Notifications You must be signed in to change notification settings

roberttoth02/RHD2000-USB-Interface-Software

Repository files navigation

RHD2000 USB Interface Software - Source Code (v1.5.4)
-----------------------------------------------------

This directory contains the RHD2000 Interface C++/Qt source code and two supporting files: main.bit
(the FPGA configuration file) and an operating system-specific Opal Kelly library file located in
the 'Opal Kelly library files' directory.

These two supporting files must reside in the directory with the executable file (i.e., the 'debug'
or 'release' folder generated when the code is compiled).  To find the directories on a Mac, 
right-click on the RHD2000interface.app file generated by Qt, select "Show package contents",
and open the "MacOS" and "Frameworks" directories.  The Qt build should automatically place the two 
supporting files in their correct place, however this should be verified by the user in case of issues.

You should also install the USB drivers before connecting the RHD2000 USB interface board to a 
computer (instructions in the 'USB interface drivers' folder).  However, you can run the RHD2000 interface 
software in demonstration mode without installing drivers or plugging in an interface board.

The C++ source code uses a handful of C++11 features, so g++ users may need to add -std=c++11 to their 
command line or make file.

This code was tested with Qt 5.15 and Qt 6.3.1, though should be backwards compatible to Qt 4.8.1.
High DPI display plot support is available using Qt 5.11 and above.
From Qt 6 onwards, plot windows support a dark theme to match the main application window (subject to 
the main window correctly detecting the system theme in the first place).

For production code, you should compile a Release build (Visual Studio) or use the optimization flag
-O3 (g++).  Otherwise, the compiled code may not be fast enough to keep up with how fast data streams
from the USB interface board.  This will show up as the FIFO lag becoming very high for debug builds.


Other Windows tips
----------------

Intan Windows software is compatible with Windows 7, 8, or 10. If you have trouble running any Intan 
software under Windows, you may need to download and install Visual C++ Redistributable Packages from 
Microsoft: 
– Visual Studio 2010: https://www.microsoft.com/en-us/download/details.aspx?id=26999
– Visual Studio 2013: https://www.microsoft.com/en-us/download/details.aspx?id=40784
– Visual Studio 2015: https://www.microsoft.com/en-us/download/details.aspx?id=48145

Some Windows users have reported that it is necessary to install Qt with 32-bit support for the 
okFrontPanel DLL to load properly.  But this was with an older version of the RHD2000 interface source
code that didn't support 64-bit, so it may not apply any more.


Other Linux tips
----------------

Run qmake on the .pro file, and then make.

The following line in the .pro file should link the application to the Opal Kelly distributable:
   unix:LIBS += -L./ -l okFrontPanel -ldl
The libokFrontPanel.so file should be automatically copied to the build folder folder.

Thanks to Josh Siegle at MIT and Open-Ephys.org for tips on Linux compilation.


Other tips on Mac compilation
-----------------------------

Intan now provides executables for MacOSX.  However, some users may wish to modify and recompile the
code on a Mac.  This description is based on exprience using a MacBook Pro running MacOSX 12.

1) Install XCode, and the XCode Command Line Tools

2) Install Qt Creator and a compatible Qt framework, e.g. via homebrew (https://brew.sh):
   brew install qt5
   brew install qt-creator

3) Create a "Kit" in Qt Creator if necessary (https://doc.qt.io/qtcreator/creator-targets.html)

4) Open the project (.pro) file in Qt Creator, with the appropriate kit, and click "Run" in release mode.

5) Inside the build directory, find the .app file that was generated.  Right-click and select "Show
   Package Contents".  Navigate to Contents->MacOS.  Confirm that "main.bit" is present in the "/MacOS" 
   directory, and "libokFrontPanel.dylib" is present in either the "/Frameworks" or the "/Resources"
   directory.  Copy manually if necessary.

6) You should now be able to run the program from both within and outside of Qt Creator.


-------------------------------------------------------------------------


License
-------

The RHD2000 USB Interface is free software, and is distributed under the terms of the GNU Lesser
General Public License as published by the Free Software Foundation.  See LICENSE and LICENSE.LESSER
for the complete license.


Recommended C++/Qt Resources
----------------------------

The total source code is around 10,000 lines in length, and is written entirely in C++ using the
open-source Qt libraries for multi-platform GUI support. (The files composing the core Rhythm API
are written in straight C++ without using Qt.)

There are countless books and other online resources related to C++ programming, so these will not
be discussed here. For C++ programmers new to Qt, the best place to start is http://qt-project.org.
We recommend downloading the Qt SDK (Software Design Kit) including Qt Creator, Qt Assistant, and the
latest Qt libraries for the operating system of choice.

The best book we have found for first-time Qt programmers is C++ GUI Programming with Qt 4, Second
Edition, by Jasmin Blanchette and Mark Summerfield (ISBN 0-13-235416-0). Chapters 1-8 and 11-12, along
with Appendices A and B, cover nearly all the aspects of Qt used in the RHD2000 interface GUI. The
library documentation available in the Qt Assistant application is also excellent and indispensable.


Related RHD2000 Documentation
-----------------------------

The following supporting datasheets provide detailed information on the operation of the Intan Technologies
RHD2000 digital electrophysiology chips and Rhythm interface; they may be found on the Intan Technologies
website, http://www.intantech.com:

* RHD2000 Series Digital Electrophysiology Interface Chips
* RHD2164 Digital Electophysiology Interface Chip
* RHD2000 Series Amplifier Evaluation System
* RHD2000 USB/FPGA Interface: Rhythm
* RHD2000 SPI Cable/Connector Specification
* RHA2000 vs. RHD2000 USB Evaluation Board Comparison
* RHD2000 Application Note: Data File Formats
* RHD2000 Application Note: I/O Voltage Level Shifting
* RHD2000 Application Note: Adding SPI Cables to a Commutator
* RHD2000 Application Note: Accelerometer Calibration
* RHD2000 Application Note: Adding an LED to Amplifier Boards

About

Small improvements, and compatibility updates to the official release of the Intan RHD2000 USB Interface Software

Resources

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.LESSER

Stars

Watchers

Forks

Releases

No releases published

Languages