- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using an electroencephalogram (EEG) that uses a CyUSB.sys driver. I am looking to get the incoming EEG data into MATLAB. I am not a coder, I have taken codes from people posting questions here in the community. some of the code I have tried to work out from "Cypress CyUSB .NET DLL Programmer's Reference". Buf is a byte type I thought using a 'uint' should do the job. Please, someone, help me write these transfer codes, or if they can share theirs that has worked for them. I have no clue how to write .net code in Matlab.
Here is a link to my previous threads.
CODE:
try
CyUSBdll = NET.addAssembly('C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\bin\CyUSB.dll');
catch error
error.message
if(isa(error,'NET.
e.ExceptionObject
else
disp('CyUSB.dll already loaded');
return;
end
end
%%USB Device Select
% Create a list of USB devices
usbDevices = CyUSB.USBDeviceList(CyUSB.
device=usbDevices.Item(0);
CEP=device.ControlEndPt;
CEP.Target=CyUSB.CyConst.TGT_
CEP.ReqType=CyUSB.CyConst.
CEP.Direction=CyUSB.CyConst.
CEP.ReqCode=0xB0;
CEP.Value=0;
CEP.Index=0;
len=64;
buf=uint(len);
CEP.XferData(ref buf, ref len);
Error:
Last line is giving me this error
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
- Can you please let us know which USB controller does it have i.e. FX2LP/FX3?
- Is it possible to share the firmware source code?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Meghavi
It is FX2LP and all we have is the hardware and a driver and software developed by the hardware people, DLLs of which are not accessible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content