用于在嵌入式CPU和PC之间通话的协议 [英] Protocols used to talk between an embedded CPU and a PC

查看:183
本文介绍了用于在嵌入式CPU和PC之间通话的协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个小型设备,其自身的CPU(AVR Mega8)应该连接到PC。假设物理连接和字节传递已经完成,在这些字节之上使用最好的协议是什么?计算机需要能够在设备上设置某些电压,并读回某些其他电压。



目前,我正在考虑一个完全由主机驱动的同步协议:电脑发送请求,嵌入式CPU答案。任何其他想法?

解决方案

Modbus 可能是您正在寻找的。它是专为您所拥有的类型的问题设计的。有很多代码/工具,遵守标准可能意味着很容易重用。它还支持人类可读ASCII,因此它仍然易于理解/测试。



请参阅 FreeModBus 用于Windows和嵌入式源代码。


I am building a small device with its own CPU (AVR Mega8) that is supposed to connect to a PC. Assuming that the physical connection and passing of bytes has been accomplished, what would be the best protocol to use on top of those bytes? The computer needs to be able to set certain voltages on the device, and read back certain other voltages.

At the moment, I am thinking a completely host-driven synchronous protocol: computer send requests, the embedded CPU answers. Any other ideas?

解决方案

Modbus might be what you are looking for. It was designed for exactly the type of problem you have. There is lots of code/tools out there and adherence to a standard could mean easy reuse later. It also support human readable ASCII so it is still easy to understand/test.

See FreeModBus for windows and embedded source.

这篇关于用于在嵌入式CPU和PC之间通话的协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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