K20 USB low-level communication

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K20 USB low-level communication

ソリューションへジャンプ
1,595件の閲覧回数
stevea
Contributor I

Greetings All,

I am working on a project with the MK20DX256VLL7 processor.  I have been able to successfully run the FSL_USB_Stack on our custom board using the CDC device (many thanks to BlackNight ).  I also have been able to communicate with a host PC using a virtual comm port. 

However, I need to design this project so that several devices can be connected to a host PC at the same time, and I'd like the user to not have to worry about the specifics of comm ports and the way that Windows auto-increments the number with each new device.  Is the CDC device appropriate for this task, and if so, what driver do I need to call in the .INF file?  Is there perhaps a better device class to use?  We are starting to look at an FTDI chip and driver set, but that seems a little silly considering the K20 already has USB capabilities.

Regards,

--steve

ラベル(2)
タグ(2)
0 件の賞賛
返信
1 解決策
1,241件の閲覧回数
bobpaddock
Senior Contributor III

I just posted some code to show what COM ports match what USB device:

"How to display com# when USB is plugged in?"

I got tired of answering the support question "What COM port do I have?".

Poking at the registry to prevent the COM port from changing is a dubious process across all the versions of Windows.

Far safer to just use the SetupAPI's as the above link shows.

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
1,242件の閲覧回数
bobpaddock
Senior Contributor III

I just posted some code to show what COM ports match what USB device:

"How to display com# when USB is plugged in?"

I got tired of answering the support question "What COM port do I have?".

Poking at the registry to prevent the COM port from changing is a dubious process across all the versions of Windows.

Far safer to just use the SetupAPI's as the above link shows.

0 件の賞賛
返信
1,241件の閲覧回数
Teckna
Contributor V

Hi Bob,

I can't see the link, it seems broken.

Many thanks

Teckna

0 件の賞賛
返信
1,241件の閲覧回数
bobpaddock
Senior Contributor III
0 件の賞賛
返信
1,241件の閲覧回数
johnstrohm
Contributor III

It appears that www.lvr.com has been hijacked or otherwise taken over by a retailer, www.luisaviaroma.com, which may or may not be legitimate.

0 件の賞賛
返信
1,241件の閲覧回数
bobpaddock
Senior Contributor III

lvr.com is now: http://janaxelson.com/

0 件の賞賛
返信
1,241件の閲覧回数
stevea
Contributor I

Thanks for this.  It looks useful, I'll give it a try.

I found a similar project in VB by J.Axelson at   http://www.lvr.com/serport.htm#example_code

The code uses the command SerialPort.GetPortNames to get the currently used ports (not necessarily open).

--steve

0 件の賞賛
返信
1,241件の閲覧回数
perlam_i_au
Senior Contributor I

I think as well as you  that CDC is the best USB class option for your project, but regard COM enumeration while connecting different devices I suggest you to check on specific documentation of USB.org - Approved Device Class Document Download, Enumeration of USB Composite Devices (Windows Drivers) and Enumeration of Interfaces on USB Composite Devices (Windows Drivers).

I hope you find this useful.

0 件の賞賛
返信