Page 1 of 1

MCP 2210

Posted: Mon Oct 30, 2017 2:36 pm
by palikem
Hello everyone.

I need to control via USB MCP2210.
Some good idea how to do it through wxDev-C++
He also tried hidapi, but negative.

Re: MCP 2210

Posted: Mon Oct 30, 2017 2:59 pm
by jgrzybowski
I do not know how to communicate with MCP2210. But my collage has already made communication with some fundino (type of arduino), this device after connection to PC with Windows via USB is recognized as a additional COM port. That is why it is possible to comunicate through wxFTP object. I am not sure is it helpful post?

Re: MCP 2210

Posted: Mon Oct 30, 2017 3:31 pm
by palikem
I will try to wxFtp.
You can explain it.
I do not know how to use it.

Re: MCP 2210

Posted: Tue Oct 31, 2017 9:11 am
by jgrzybowski
wxFTP you can use only if your device MCP2210 is shown in operating system as a COM port.

Code: Select all

//global objects/variables
extern wxBaud baudBaudrate; //baudrate [1200...115200], default is 38400
extern wxString stringDevName; //connected device, default is COM1
extern int intTimeout; //communication timeout in ms (default is 1000ms)
extern int intTimeOutFlag;
extern int intDatabits;
extern int intStopbits;
extern wxParity parityParity;
extern wxSerialPort *serialportDevice;
extern wxSerialPort_DCS serialportDeviceDCS;
//...
int YourMainFrameFrm::OpneCOMport()
{
	if(serialportDevice->SetBaudRate(baudBaudrate) == -1) //try to set up baud rate
	   wxMessageBox(wxT("Error baudrate."), wxT("Error baudrate"), wxOK | wxCENTRE | wxICON_ERROR);
    serialportDevice->m_dcs.parity = parityParity;
    serialportDevice->m_dcs.wordlen = intDatabits;
    serialportDevice->m_dcs.stopbits = intStopbits;
    serialportDevice->m_dcs.rtscts = false;
    serialportDevice->m_dcs.xonxoff = false; //Handshaking
    //
	int Result = serialportDevice->Open(stringDevName.c_str(), &serialportDeviceDCS);
    
    return Result;
}

Re: MCP 2210

Posted: Tue Oct 31, 2017 1:36 pm
by palikem
Thanks for your demo
its not working
I found something "hid.h" , I only have a problem with that
the device is on the computer as HID-compliant vindor-definied device

Re: MCP 2210

Posted: Wed Nov 01, 2017 11:57 am
by palikem
So no one knows !!!

Re: MCP 2210

Posted: Wed Nov 01, 2017 2:21 pm
by ONEEYEMAN
Hi,
What is this device? Does it use any external library to communicate with? Is there a sample along with the drivers that you can download and look thru?

Thank you.

Re: MCP 2210

Posted: Wed Nov 01, 2017 5:34 pm
by palikem
it's a USB SPI converter.
there is no library.
At least I did not find it.
what i found for VS C++.
I see the device on my computer as HID.

Re: MCP 2210

Posted: Wed Nov 01, 2017 6:05 pm
by ONEEYEMAN
Hi,
Did you see this?
It has a documentation, the DLL and CLI interface binary.

I also think you can talk to company so they provide the API to talk to the board.

Thank you.

Re: MCP 2210

Posted: Wed Nov 01, 2017 7:15 pm
by palikem
Now I am very confused.
How it is used in wxDev-C++.
I am a beginner