dll function variable deceleration

hai i am using a ADC with USB to SPI converter(MCP2210). i have loaded the dll of converter into matlab. i can able to configure GPIO,clk of converter etc.
But not able to Receive the data with function TxferSpiData in dll of converter.
but with software provided by microchip(SPI terminal mcp2210.exe) getting the ADC data through Converter. i dont understand how to pass arguments with this function and get data into array.
Data provided by Micochip for dll function TxferSpiData use
Name: TxferSpiData
Purpose: Transfer the specified SPI data
Parameters:
Inputs: dataTx (array<Byte>^) - Array of SPI data to send to device. This array should be at least the same size as numBytes or larger.
Outputs: dataRx (array<Byte>^) Array that contains SPI data received. This array should be at least the same size as numBytes or larger.
Returns: int -
Return value: negative = error
0 = success
*khan=NET.addAssembly('E:\ikram\project\brain machin interface\softwares\usb\MCP2210DLL-M.dll');
khan= MCP2210.DevIO(hex2dec('04D8'),hex2dec('00DE'));
b=buffer(216,27);
c=buffer(216,27);
khan.Functions.TxferSpiData(b,c)*
data is not getting loaded into the variable 'c' buffer, is this deceleration is correct as per the microchip? how to used this function. please Guide me in using this function.
Thanks & Regards Ikram khan

2 Kommentare

ikram khan
ikram khan am 1 Apr. 2013
it is my final year project, any one help
Kaustubha Govind
Kaustubha Govind am 1 Apr. 2013
You may want to look at the documentation for Call .NET Methods With ref Keyword.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Communications Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Gefragt:

am 31 Mär. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by