-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read 1536 channels from one Ph2C probe
- Loading branch information
1 parent
6791610
commit 8f8d938
Showing
11 changed files
with
1,404 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
3-28-2024 | ||
--- | ||
|
||
Upgraded QBSC firmware from .189 to .190 | ||
Compiled plugin w/ API 3.67 by commenting out all code related to setting SYNC param. | ||
Initially plugin wouldn't load. Dependency walker showed it was linking to NeuropixAPI_x64_3_67_dbg.dll. | ||
Renaming NeuropixAPI_x64_3_67.dll to NeuropixAPI_x64_3_67_dbg.dll enabled the plugin to load properly. | ||
|
||
I was able to connect to one headstage and one probe: | ||
|
||
[open-ephys] Scanning for devices... | ||
[open-ephys] Found 1 device. | ||
[open-ephys] Opening device on slot 4 | ||
[open-ephys] Opened BS on slot 4 | ||
[open-ephys] BS firmware: 2.0169 | ||
[open-ephys] Searching for probes... | ||
[open-ephys] Got HS part #: NPM_HSTC_ext <-- Do we ignore this part #? | ||
[open-ephys] Got HS part #: NPM_HS_32 | ||
[open-ephys] Found 2.0 Phase 2C dual-dock headstage on port: 1 | ||
[open-ephys] No headstage detected on port: 3 | ||
[open-ephys] No headstage detected on port: 4 | ||
[open-ephys] Found probe part number: NP2020 | ||
[open-ephys] Found probe serial number: 22053112201 | ||
|
||
On subsequent connections randomly getting either error code 8 OR 2.0 probe headstage number: | ||
|
||
[open-ephys] ***detectHeadstage failed w/ error code: 8 | ||
[open-ephys] Got HS part #: NPM_HS_01 | ||
|
||
|
||
|
||
|
||
4-2-2024 | ||
--- | ||
|
||
Downgrading QBSC firmware back to .189 no longer gives wrong HS PN but rarely still getting error 8. | ||
|
||
Created Ph2C Geometry based off NP2 multi shank class and Ph2C User Manual to validate probe. | ||
|
||
Added a loop to read packets by base / source type 384 channels at a time to fill a 384 * 4 total buffer. | ||
|
||
TOFIX: | ||
|
||
|
||
|
||
Changes required for compatibility with current plugin paradigm | ||
|
||
1. Upgrade PortChecker b/c ports are no longer independent and connecting to multiple Ph2C probes this way will not work. | ||
We either have to scan ports serially and check that NPM_HS_32 is on port 1 or 3, if so, ensure that NPM_HSTC_ext is found on 3 or 4 respectively. | ||
Otherwise, keep the parallel jobs but then validate port indeces before initiating connection to probes. | ||
|
||
2. Modify basestation view in plugin editor. | ||
If NP2020 detected on port 1/3, show as dual dock and remove port circle on 2/4 respectively. | ||
|
||
Questions for Bill/Jan: | ||
|
||
1. What to do about port 2/4 status LED, it currently remains red even if port 1/3 is connected/acquiring (see picture) | ||
TODO: Try to open port 2/4 anyway and see if it changes the status LED. |
Binary file added
BIN
+2.17 MB
Resources/imec-firmware-for-plugin-0.6.x/imec-firmware-for-plugin-0.6.x/BS_FPGA_B169.bin
Binary file not shown.
Binary file added
BIN
+1.53 MB
Resources/imec-firmware-for-plugin-0.6.x/imec-firmware-for-plugin-0.6.x/QBSC_FPGA_B189.bin
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/* | ||
------------------------------------------------------------------ | ||
This file is part of the Open Ephys GUI | ||
Copyright (C) 2024 Allen Institute for Brain Science and Open Ephys | ||
------------------------------------------------------------------ | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "Headstage_Ph2C.h" | ||
#include "../Probes/Neuropixels_Ph2C.h" | ||
|
||
#define MAXLEN 50 | ||
|
||
void Headstage_Ph2C::getInfo() | ||
{ | ||
|
||
int version_major; | ||
int version_minor; | ||
|
||
errorCode = Neuropixels::getHSVersion(basestation->slot, port, &version_major, &version_minor); | ||
|
||
info.version = String(version_major) + "." + String(version_minor); | ||
|
||
errorCode = Neuropixels::readHSSN(basestation->slot, port, &info.serial_number); | ||
|
||
char pn[MAXLEN]; | ||
errorCode = Neuropixels::readHSPN(basestation->slot, port, pn, MAXLEN); | ||
|
||
info.part_number = String(pn); | ||
|
||
} | ||
|
||
|
||
void Flex_Ph2C::getInfo() | ||
{ | ||
|
||
int version_major; | ||
int version_minor; | ||
|
||
errorCode = Neuropixels::getFlexVersion(headstage->basestation->slot, | ||
headstage->port, | ||
dock, | ||
&version_major, | ||
&version_minor); | ||
|
||
info.version = String(version_major) + "." + String(version_minor); | ||
|
||
char pn[MAXLEN]; | ||
errorCode = Neuropixels::readFlexPN(headstage->basestation->slot, | ||
headstage->port, | ||
dock, | ||
pn, | ||
MAXLEN); | ||
|
||
info.part_number = String(pn); | ||
|
||
} | ||
|
||
|
||
Headstage_Ph2C::Headstage_Ph2C(Basestation* bs_, int port) : Headstage(bs_, port) | ||
{ | ||
getInfo(); | ||
|
||
int count; | ||
|
||
Neuropixels::getHSSupportedProbeCount(basestation->slot, port, &count); | ||
|
||
for (int dock = 1; dock <= count; dock++) | ||
{ | ||
bool flexDetected; | ||
|
||
Neuropixels::detectFlex(basestation->slot, port, dock, &flexDetected); | ||
|
||
if (flexDetected) | ||
{ | ||
flexCables.add(new Flex_Ph2C(this, dock)); | ||
Neuropixels_Ph2C* probe = new Neuropixels_Ph2C(basestation, this, flexCables.getLast(), dock); | ||
|
||
if (probe->isValid) | ||
{ | ||
probe->setStatus(SourceStatus::CONNECTING); | ||
probes.add(probe); | ||
} | ||
else | ||
{ | ||
delete probe; | ||
probes.add(nullptr); | ||
} | ||
|
||
} | ||
else { | ||
probes.add(nullptr); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
Flex_Ph2C::Flex_Ph2C(Headstage* hs_, int dock) : Flex(hs_, dock) | ||
{ | ||
getInfo(); | ||
|
||
errorCode = Neuropixels::SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
------------------------------------------------------------------ | ||
This file is part of the Open Ephys GUI | ||
Copyright (C) 2024 Allen Institute for Brain Science and Open Ephys | ||
------------------------------------------------------------------ | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef __NEUROPIXHSP2C_H_2C4C2D67__ | ||
#define __NEUROPIXHSP2C_H_2C4C2D67__ | ||
|
||
|
||
#include "../API/v3/NeuropixAPI.h" | ||
#include "../NeuropixComponents.h" | ||
|
||
|
||
class Headstage_Ph2C : public Headstage | ||
{ | ||
public: | ||
Headstage_Ph2C::Headstage_Ph2C(Basestation*, int port); | ||
void getInfo() override; | ||
bool hasTestModule() override { return false; } | ||
void runTestModule() override {} | ||
|
||
Neuropixels::NP_ErrorCode errorCode; | ||
}; | ||
|
||
class Flex_Ph2C : public Flex | ||
{ | ||
public: | ||
Flex_Ph2C::Flex_Ph2C(Headstage*, int dock); | ||
void getInfo() override; | ||
|
||
Neuropixels::NP_ErrorCode errorCode; | ||
}; | ||
|
||
#endif // __NEUROPIXHSP2C_H_2C4C2D67__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,8 @@ enum class ProbeType { | |
UHD2, | ||
NP2_1, | ||
NP2_4, | ||
OPTO | ||
OPTO, | ||
PH2C | ||
}; | ||
|
||
enum class SourceStatus { | ||
|
Oops, something went wrong.