MCP 2210

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

MCP 2210

Post 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.
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: MCP 2210

Post 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?
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

Re: MCP 2210

Post by palikem »

I will try to wxFtp.
You can explain it.
I do not know how to use it.
jgrzybowski
Earned some good credits
Earned some good credits
Posts: 113
Joined: Sat Sep 24, 2011 9:32 pm
Location: Poland

Re: MCP 2210

Post 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;
}
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

Re: MCP 2210

Post 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
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

Re: MCP 2210

Post by palikem »

So no one knows !!!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MCP 2210

Post 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.
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

Re: MCP 2210

Post 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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MCP 2210

Post 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.
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

Re: MCP 2210

Post by palikem »

Now I am very confused.
How it is used in wxDev-C++.
I am a beginner
Post Reply