用于在嵌入式CPU和PC之间通话的协议 [英] Protocols used to talk between an embedded CPU and a 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屋!