通过Windows在C#WPF中通过USB消息传递与设备进行通信 [英] Communicating with a device by windows messaging through USB in C# WPF

查看:821
本文介绍了通过Windows在C#WPF中通过USB消息传递与设备进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在尝试使用Windows消息传递和通过USB端口与设备进行通信.我将用C#和WPF编写代码.
该器件具有一个使用赛普拉斯USB驱动器芯片(CY7C6 ###)的接口板.我已经安装了它们的通用驱动器,并更改了PID(产品ID)和VID(供应商ID)编号以匹配设备.因此,我的电脑可以看到cypress USB驱动程序.超出这一点,我不知道该怎么办,因为接口和设备都没有DLL.我也找不到任何在线.
设备采用文本命令来执行某些任务.因此,我的计划是使用Windows消息传递,并通过USB发送和接收文本到此设备.
对于您可能需要与此设备进行通信的其他建议,我持开放态度.
如果Windows消息传递是一个好主意,请向我提供您可以提供的所有信息.
谢谢.
HB

Hello everyone

I am trying to communicate with a device by using windows messaging and through a USB port. I will be writing the code in C# and WPF.
The device has a an interface board that uses a Cypress USB driver chip (CY7C6###). I have installed their generic drives and change the PID (product ID) and VID (Vendor ID) numbers to match the device. So, my PC can see the cypress USB driver. Beyond this point I don''t know what to do since neither the interface nor the device come with a DLL. I can not find any online either.
The device takes text commands to perform certain tasks. So, my plan is to use windows messaging and send and receive texts through USB to this device.
I am open to any other suggestions you might have to communicate with this device.
If windows messaging is a good idea please provide me with any information you can.
Thanks.
HB

推荐答案



您能告诉我们您要将Cypress连接到PC的目的吗?这类似于存储设备还是ADC?我的意思是您对目标设备有一些要求或要求吗?

据我了解,CY7C6 ###是微处理器,因此您需要编写软件,编译并将结果二进制文件(.hex ...或其他内容)刷新到其中.该固件可以响应您的"USB端"请求.

P.S.在一般情况下,写入/读取/写入USB设备不是问题.使用此类设备的工作类似于文件操作(打开(CreateFile(...)),读取(ReadFile(...))和写入(WriteFile(...))).

P.P.S.总而言之,也许这件事"SuiteUSB 3.4-用于Visual Studio的USB开发工具"将帮助您...
http://www.cypress.com/?rID=34870

谢谢!

BR,
Viktor Signaievkyi
Hi,

Could you tell us the aim you want to connect Cypress to PC? Is this something like storage device or the kind of ADC? I mean do you have some requirements or requests to the target device?

As I know CY7C6### is a microprocessor, so you need to write the software, compile and flash the resulting binary (.hex... or something else) into it. This firmware could respond to your "USB-side" requests.

P.S. In general case it is not a problem to write/read into/to the USB device. The work with such device is similar to the file operations (Open (CreateFile(...)), Read (ReadFile(...)) and Write (WriteFile(...))).

P.P.S. By the all, maybe this thing "SuiteUSB 3.4 - USB Development tools for Visual Studio" will help you...
http://www.cypress.com/?rID=34870

Thanks!

BR,
Viktor Signaievkyi


这篇关于通过Windows在C#WPF中通过USB消息传递与设备进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆