我正在开始一个新的项目,进入这个全新的微控制器部分,所以我的问题可能听起来很简单,但我需要你的帮助,
我有一个基于微控制器的机器,它可以执行一些计数和计时器相关的活动。本机通过串口与PC机连接。
我想从机器上读取数据。
为此,我需要知道哪些信息,例如
- 端口号?
- 波特率?
- 有编码/解码吗?
我可以在机器显示屏上看到数据,但随后我必须手动将其输入系统,所以我想自动化此过程。
客户有一个以前可以运行的软件,但现在他们希望我升级它。机器供应商/旧软件供应商无法向他们询问任何详细信息。
没有文档存在。
所以我想知道这是否可行?
I am starting a NEW project into this complete new segment of microcontroller, so my questions may sound simple but I need your help here
I have a Micro-controller based machine which does some counting and timer related activities. This machine is connected to PC using serial port.
I want to read the data from the machine.
For this what are the things that I need to know like
- Port No?
- Baud Rate?
- Any encoding/decoding?
I can see the data on the machine display but then I have to manually enter it into system so I want to automate this process.
Client had a software which was working previously but now they want me to upgrade it. Machine vendor/ old software vendor are out of reach to ask them any details.
No documentation is present.
So I want to know whether this is feasible or not?
发布评论
评论(1)
您可以在此处找到有关从 .NET 托管语言程序访问串行端口的数据:
http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx
至于com 端口号、波特率和编码是您唯一能够回答的问题微控制器手册。
PC 串行端口硬件可以涵盖大量不同的配置,如果不阅读微控制器文档,就不可能确切地知道设置应该是什么。
然而根据经验,4800 & 9600 往往是相当标准的速度,我曾经使用过的每个设备都有 1 个停止位、8 个数据位并且没有奇偶校验,并且通过使用串行终端程序进行一些侦探工作(Putty 将在这里做得很好)和设备管理器。
You can find data on accessing the serial port from a .NET managed language program here:
http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx
As for com port numbers, baud rates and encoding the ONLY thing that will be able to answer that will be your micro-controllers manual.
PC Serial port hardware can cover a huge amount of different configurations, and it would be impossible to know without reading the micro-controller documentation exactly what the settings should be.
From experience however, 4800 & 9600 tend to be fairly standard speeds, every device Iv'e ever used has been 1 stop bit, 8 data bits and no parity and the com port has always been visible by a little bit of detective work with a serial terminal program (Putty will do the job just fine here) and the device manager.