Re: Data Capture Using USB2
Well, what is your Visual C++ Programming question or probkem?
Re: Data Capture Using USB2
I used RS232 & RS485. after installed the driver its shown like Com3, Com 4 in port setting.
If i plug this USB2 means, How its appear ? & how can i get data from this.
Re: Data Capture Using USB2
Re: Data Capture Using USB2
This may not be doable with USB2 depending what you need.
USB can run in different modes. Either in message mode or streaming and streaming has additional subtypes.
You can get a guaranteed streaming speed (in one direction), but in that case you will have to deal with possible data loss.
alternatively you can get guaranteed reception, but not a quaranteed speed.
Even USB3 with it's higher max speed can't guarantee both transfer speed and reception at 60Mbps
If you're ok with possible dataloss, then guaranteed speed (isochronous streaming transfer) is explained on:
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Re: Data Capture Using USB2
Quote:
Originally Posted by
VictorN
USB while "serial"... Has very little to do with RS232 communication. :)
Re: Data Capture Using USB2
Quote:
Originally Posted by
OReubens
Quote:
Originally Posted by
VictorN
USB while "serial"... Has very little to do with RS232 communication. :)
It was the answer to the OP's post:
Quote:
Originally Posted by
saraswathisrinath
I used RS232 & RS485. after installed the driver its shown like Com3, Com 4 in port setting.
If i plug this USB2 means, How its appear ? & how can i get data from this.
Re: Data Capture Using USB2
Hi,
I used serial communication like below only,
Code:
BOOL SerialPort::InitPort(UINT portnr,UINT baud,char parity,
UINT databits,UINT stopbits, DWORD dwCommEvents,UINT writebuffersize)
{
// Code for Port initialize
}
Initialize Like
Code:
InitPort(4,9600,'E',8,1);
Read Data from port like
Code:
ReadFromPort()
{
bResult = ReadFile(m_hComm,&RXBuff,1,&BytesRead,&m_ov);
bResult1 = GetOverlappedResult(m_hComm,&m_ov,&BytesRead,TRUE);
}
My doubt is, shall i use this same way to get high speed data? is possible?
Thanks Mr.Victor & Mr.OReubens. I will read the posted web pages and come back.
Re: Data Capture Using USB2
Quote:
Originally Posted by
saraswathisrinath
My doubt is, shall i use this same way to get high speed data? is possible?
maybe... there are serial hardware ports that can do 60Mbps and larger and that you can access via the "COM" ports in windows.
USB isn't among them
While there are drivers that allow you to access a USB in a similar method as an RS232 (The Arduino project uses this principle). The speed at which you can do this is limited.
If you need guaranteed 60Mbps (with possible dataloss), you will need to write a kernel mode isochronous USB driver.
If you don't need the guaranteed speed, there are alternatives for USB. Such as interfacing via the WinUSB driver, they can offer data integrity, but the speed will be limited and may not be stable (data may come in bursts).