港口交通问题 [英] COM PORTS PROBLEM

查看:77
本文介绍了港口交通问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个仅连接到串行端口PIN 2的微控制器.我的问题是我在c ++/c#/vb中使用了什么命令来读取PIN2中的数据.有人可以为我的问题提供程序员帮助或软件开发人员帮助吗?我是上述编程语言的初学者.

I have a microcontroller connected to serial comports PIN 2 only. my problem is what command i used in c++/c#/vb to read data in PIN2. can anybody programmer help or software developer help regarding my problems. i am beginner of the said above programming laguage. thanks in advance.

推荐答案

实际上,我对您的问题感到困惑.我了解的是PIN2(Rx数据接收)已连接9针连接器(端口).仅..,如果未连接PIN3(Tx-Data Transmit),则如何将命令发送到控制器..,

浏览下面的PIN连接器表链接
http://www.dataip.co.uk/Reference/Serial9DPinOut.ph [ ^ ]
Actually I am Confused with your Question .., Keep Side about Programming Languages.., You are telling only PIN2 is Connected. what i understood is that 9 pin connector(comport) the PIN2(Rx-Data Receive) is connected. only.., if PIN3(Tx-Data Transmit) is not connected how you send the command to the controller..,

Go through the below link for PIN Connector table
http://www.dataip.co.uk/Reference/Serial9DPinOut.ph[^]


我是非常感谢您的回复.我认为这是一种设备,而不是微控制器.这个设备就是我们所说的硬币插槽/接收器,它们有4根线,第一和第二根线是12volts&ground,我直接连接到PC电源,第三根对我来说并不重要,第四根线我放它到pin2 comports.

我发现在万用表中看到硬币掉落到插槽/接收器时,我注意到的第4根导线会增加电压.

这次,我计划构建一个软件,该软件由连接到pin2的此设备触发,并链接到我的程序.

例如示例...倒数计时器,
相反,这次我将为倒数计时器输入数据,而该设备只是用于输入数据的设备.

我希望其他在comports编程方面有知识的程序员会告诉我我在vb或c ++或c#中使用的命令.

谢谢,谢谢!
I am very thankful to your response. i think it is a device not a microcontroller. This device is what we called coins slot/acceptor, they have 4 wires, the 1st & 2nd wire is 12volts & ground which i am directly connect to the pc power supply, the 3rd one is not important to me and the 4th wire i put it to the pin2 comports.

the 4th wire i notice are giving increase of volts when there is coins drop to the slot/acceptor, which i see in multitester.

this time, i plan to build a software which trigger by this device connected to pin2 comports and link to my program.

like example... countdown timer,
instead i am going to input data for my countdown timer this time the device is only the one to input data.

i hope other programmers those who have knowledge in comports programming will give me idea what command i am use in vb or c++ or c#.

thank you and more power.


所以..,您想读取掉进设备中的每枚硬币的信号..

通过以下链接获取串行端口数据接收"事件.

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.datareceived.aspx [ ^ ]
So.., You want to read signal for every coin drops into the device..,

Go through the below link for Serial Port Data receive event.

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.datareceived.aspx[^]


这篇关于港口交通问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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