良好地从RS232微控制器接收数据 [英] good receive data from RS232 microcontroller

查看:82
本文介绍了良好地从RS232微控制器接收数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一些问题.
情况是,我想使用串行RS-232将一些数据传输到我的项目Windows Form应用程序.
我使用微控制器AVR发送该数据.
所有数据均为(温度,湿度,气压和RPM速度)
(float数据,int数据,int数据,int数据)

在我的GUI上,我将接收所有数据,然后显示所有数据,例如控制面板.
我的问题是,
1.这种情况会成为现实吗?
2.如果可以,如何接收所有数据并显示到我的GUI并像控制面板一样查看.因为我测试了它可以在GUI中接收不是数字数据的数据,并且无法修剪所有数据.


都可以帮我,,
我是新手.
感谢

hi all,
i have some problems.
the case is, i want to transmitted some data with serial RS-232 to my project windows Form application.
i send that data using microcontroller AVR.
all data is (temperature, humidity , air pressure , and RPM speed)
( float data, int data , int data , int data )

on my GUI, i will receive all data, and than will show all data like control panel.
my problem is,,
1. can this case will be reality??
2. if this can, how to receive all data and show to my GUI and view like control panel. because i tested it to receive data in my GUI not a numeric data, and i cant trim all data.


can all help me,,,
i''am newbie here.
thanks

推荐答案

首先,与RS232的串行通信必须可靠.也不例外.

现在将您的问题分为三个部分
1.通用协议,什么数据意味着什么.假设您要发送温度,湿度.两者都是浮点数据,您怎么知道?您将必须正确识别它们.
2.微控制器部分.开发微控制器应用程序,该应用程序将传输收集的数据并将其发送到您的计算机.对其进行澄清以确保其有效.
3.桌面应用程序部分:如果您具有识别数据的正确方法,那么可以在互联网上获得很多解决方案来对RS232串行端口进行编程
First of all serial communication with RS232 should have to be reliable. no exception.

Now splitup your problem in to three parts
1. General Protocol, what data mean what. Say you are sending temperature, humidity. both are floating point data, how would you know? you will have to identify them properly.
2. Micro-controller part. Develop micro-controller application which will transfer collect data and send it to your computer. clarify it make sure it works.
3. Desktop application part: If you have proper method to identify your data then there is lots solution you will get on internet to program RS232 Serial Port


这篇关于良好地从RS232微控制器接收数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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