I am an electrical engineering student and we are using an XMOS-XS1-U microprocessor for data transfer into a PC. This will be serial data via USB 2.0 @ 72 Mbits/s. We're hoping to directly transfer that data into Matlab for computation but it doesn't appear there are any supported drivers from Mathworks. Has anyone tried this or have any advice on how to make this work? I'm actually studying microwave/RF engineering but my part of this project is data computation so this is unfamiliar territory for me. I've only taken a couple of C++ classes and one microprocessor class. I am however pretty good at Matlab. Thanks for the help!
Matlab data acquisition?
-
- Newbie
- Posts: 1
- Joined: Sun Feb 22, 2015 9:09 pm
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
Hi,
You may try transferring the device data to the Matlab script using the following mode:
USB device [USB CDC class] <=serial data transfer=> Host PC with Matlab [Matlab Serial port object]
Refer to
> In order to create a USB CDC class, refer to https://www.xmos.com/support/appnotes/AN00124?secure=1
> http://in.mathworks.com/help/matlab/ser ... vices.html
Hope this helps.
Srinie
You may try transferring the device data to the Matlab script using the following mode:
USB device [USB CDC class] <=serial data transfer=> Host PC with Matlab [Matlab Serial port object]
Refer to
> In order to create a USB CDC class, refer to https://www.xmos.com/support/appnotes/AN00124?secure=1
> http://in.mathworks.com/help/matlab/ser ... vices.html
Hope this helps.
Srinie
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
Hi,
Alternately, the target MCU device can be used as a Test and Measurement class device. In such as case, the below application guide has the detailed steps:
https://www.xmos.com/download/public/AN ... easurement...
Section "2.10: Handling requests to the USBTMC bulk endpoint", *VENDOR_SPECIFIC_* requests can be used to achieve the data transfers from the device; "APPENDIX D - Using SCPI library to add more SCPI command" also helps to add additional commands to be handled in the device firmware.
Hope this helps.
Alternately, the target MCU device can be used as a Test and Measurement class device. In such as case, the below application guide has the detailed steps:
https://www.xmos.com/download/public/AN ... easurement...
Section "2.10: Handling requests to the USBTMC bulk endpoint", *VENDOR_SPECIFIC_* requests can be used to achieve the data transfers from the device; "APPENDIX D - Using SCPI library to add more SCPI command" also helps to add additional commands to be handled in the device firmware.
Hope this helps.