Read Unformatted SD Card in Matlab

3 views (last 30 days)
I have raw data that was stored by an 8-bit micro-controller onto an unformatted SD Card. In the micro it treats the SD Card as a large unified flash file and will write bytes accordingly into SD Card memory. I now want to analyze the data in Matlab and I can't seem to find a work around for opening the SD Card as 1 large binary file. Windows recognizes that the SD Card is not formatted and therefore will not browse to the file in windows explorer. I've created a C# program that will open the SD Card using the CreateFile method and supplying \\.\PYISCALDRIVE1 as the file to open, the SD Card happens to be the 2nd drive on my computer. I can then write the file out as a text file but I would like to do this all from within Matlab if at all possible. 3rd party programs such as winHex can open the unformatted SD Card so it is a least possible for programs to access the file.
Any ideas on how to do this all from within Matlab?
Thank you

Accepted Answer

Philip Borghesani
Philip Borghesani on 19 Sep 2013
This probably can't be done entirely within MATLAB. I suggest turning your C# code into a library that can be accessed using the MATLAB .net interface or if you also know c writing a mex file to access the data.
  1 Comment
David
David on 19 Sep 2013
I was afraid that was going to be the answer, I can compile into a DLL or mex the function in C so that shouldn't be a problem. I was just hoping for a Matlab work around. Thank you for the response.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!