MCP 2210

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
palikem
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Oct 28, 2017 9:33 am

MCP 2210

Postby palikem » Mon Oct 30, 2017 2:36 pm

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

Postby jgrzybowski » Mon Oct 30, 2017 2:59 pm

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
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Oct 28, 2017 9:33 am

Re: MCP 2210

Postby palikem » Mon Oct 30, 2017 3:31 pm

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

Postby jgrzybowski » Tue Oct 31, 2017 9:11 am

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
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Oct 28, 2017 9:33 am

Re: MCP 2210

Postby palikem » Tue Oct 31, 2017 1:36 pm

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
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Oct 28, 2017 9:33 am

Re: MCP 2210

Postby palikem » Wed Nov 01, 2017 11:57 am

So no one knows !!!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2009
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MCP 2210

Postby ONEEYEMAN » Wed Nov 01, 2017 2:21 pm

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
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Oct 28, 2017 9:33 am

Re: MCP 2210

Postby palikem » Wed Nov 01, 2017 5:34 pm

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: 2009
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: MCP 2210

Postby ONEEYEMAN » Wed Nov 01, 2017 6:05 pm

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
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sat Oct 28, 2017 9:33 am

Re: MCP 2210

Postby palikem » Wed Nov 01, 2017 7:15 pm

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


Return to “wxDev-C++”

Who is online

Users browsing this forum: No registered users and 1 guest