Recent Posts

Pages: [1] 2 3 ... 10
1
Serial Ports / Re: Creating a 485/422 Host...
« Last post by GlennP on June 22, 2018, 09:28:38 am »
Ah, I am right the 'host' is the PC/Widget sending the data.
2
Serial Ports / Re: Creating a 485/422 Host...
« Last post by Jan Axelson on June 22, 2018, 08:37:25 am »
RS-485 and RS-422 are hardware standards only. They don't address protocols.

An RS-422 network has one driver and up to ten receivers.   

An RS-485 network can have multiple drivers and receivers and can use any protocol to decide who gets to transmit. For example, a designated node might send messages that include a node address, and the addressed sends a response. Or the nodes might transmit in a defined sequence.
3
USB / Re: bulk transfers
« Last post by ADB on June 22, 2018, 08:11:42 am »
Hi Jan,

I've been able to enumerate my microcontroller as a WCID device with Microsoft 1.0 descriptors and have been able to do bulk transfers with a PC application running a libusb driver.

Since the device descriptor side of things has now been stripped down, I'm not doing HID or CDC. What is the name of what I'm doing?

With my test program, I have sent 16MB of data in 512 byte packets (High Speed). According to my protocol analyser I'm doing about 60 Mb/s (7.5 MB/s). This seems quite far off the 480 Mb/s of the standard. Why is this the case?

Thanks again,

Alan
4
Serial Ports / Creating a 485/422 Host...
« Last post by GlennP on June 22, 2018, 06:44:13 am »
Hi,
Long time since I have been here, but I want to make sure I configure correctly for a 485/422 host.  I am guessing the host is defined as the device that transmits the packet of data over the network to each device.
5
USB / Re: bulk transfers
« Last post by ADB on June 18, 2018, 04:01:11 pm »
Thanks Jan. I will read up on Microsoft OS descriptors.

Regards,

Alan
6
USB / Re: bulk transfers
« Last post by Jan Axelson on June 18, 2018, 08:52:21 am »
Bulk transfers are the fastest on an otherwise idle bus but have no guaranteed timing.

Interrupt transfers have guaranteed maximum latency, or time between transaction attempts.

To access a virtual serial port device, you use the SerialPort class (assuming .NET). To access a WinUSB device, you use the WinUSB API.

The host system uses the descriptors to decide what driver to assign to a device. If the descriptors define the device (or interface) as HID, the host will assign the HID driver. For WinUSB, use Microsoft OS descriptors.

See my Serial Port and WinUSB pages at janaxelson.com for more information.
7
USB / Re: bulk transfers
« Last post by ADB on June 18, 2018, 03:55:28 am »
Hi Jan,

Thank you for getting back to me. What are the advantages of bulk over interrupt transfers? I read somewhere that there is the same amount of error checking in both.

What is the best VCOM of WINUSB for the bulk transfer?

I've attached my USB descriptor C file. If I understand your last post correctly, if I want to use WINUSB for bulk transfer, I need to remove the CIC, DIC and IAD descriptors?

Thanks again,

Alan
8
USB / Re: bulk transfers
« Last post by Jan Axelson on June 15, 2018, 09:21:30 pm »
If the device enumerates as a virtual COM Port, access it using the SerialPort class (assuming .NET).

If you want to use WinUSB,  don't use descriptors that define the device (or interface) as a member of a defined USB device class.

The WinUSB and Serial Port pages on my website, janaxelson.com, have more information and example code.

Feel free to post again if you have further questions.
Hi Jan,

I'm trying to implement a bulk transfer of 16 MB of data between a microcontroller and a PC. HID cannot do bulk transfers, so I have to use CDC. I've been able to put together a CDC program on my microcontroller which enumerates as CDC, HID and VCOM.

I've been able to do interrupt transfers with your winusb_cs_31 program but not bulk transfers. For this my microcontroller was writing to the HID endpoint. To get a bulk transfer up and going, I take it that my microcontroller needs to write to the CDC endpoint?

Thanks in advance for your advice,

Regards,

Alan
9
USB / bulk transfers
« Last post by ADB on June 15, 2018, 08:41:40 am »
Hi Jan,

I'm trying to implement a bulk transfer of 16 MB of data between a microcontroller and a PC. HID cannot do bulk transfers, so I have to use CDC. I've been able to put together a CDC program on my microcontroller which enumerates as CDC, HID and VCOM.

I've been able to do interrupt transfers with your winusb_cs_31 program but not bulk transfers. For this my microcontroller was writing to the HID endpoint. To get a bulk transfer up and going, I take it that my microcontroller needs to write to the CDC endpoint?

Thanks in advance for your advice,

Regards,

Alan
10
USB / Re: FindDeviceFromGuid issue with Framework 4.5
« Last post by Jan Axelson on June 13, 2018, 09:15:04 am »
The "4" refers to the initial 4 bytes (the DWORD cbsize parameter) in the SP_DEVICE_INTERFACE_DETAIL_DATA structure so should be OK.

In other words, you're getting a pointer to the 5th byte in the structure, and the structure doesn't change with 32/64-bit platform.
Pages: [1] 2 3 ... 10