有人可以帮助我使用这个串行协议。 [英] Can someone help me with this serial protocol.

查看:59
本文介绍了有人可以帮助我使用这个串行协议。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在两个系统之间建立链接。它们通过串行链路进行通信。我知道协议和所有命令。

然而我无法弄清楚dn应该是什么意思。它的数量是多少?

我也不知道crc.high和crc.low是什么。我知道crc是校验和,我知道如何计算它,但我不知道它的高低是什么。

I am making a link between 2 systems. They communicate over a serial link. I know the protocol and all the commands.
However I can’t figure out what the “dn” is supposed to mean. Is it the number of d’s?
I also don’t know what the crc.high and crc.low is all about. I know that the crc is a checksum and I know how to calculate it but I don’t know what the high and low are.

推荐答案

dn是数据的最后一个字节; d1是第一个数据字节,d2是第二个数据字节,当你有n个字节的数据时,dn是最后一个数据字节。 crc.high和crc.lo是16位宽crc编号的高低字节(16位== 2字节)。


亲切的问候,


Jos
dn is the last byte of data; d1 is the first data byte, d2 is the second data byte and when you have n bytes of data, dn is the last data byte. crc.high and crc.lo are the hi and lo bytes of the 16 bit wide crc number (16 bits == 2 bytes).

kind regards,

Jos


谢谢你,你是我的英雄。
Thank you man, you are my hero.


@ kryptonite88


当然欢迎您;你仍然需要阅读规范,因为从那张图片我不知道'cmd'字节(或前导/尾随字节)是否包含在crc值中。


亲切的问候,


Jos
@kryptonite88
You''re welcome of course; you still have to read the specification because from that picture I can''t tell whether or not the ''cmd'' byte (or the leading/trailing bytes) is/are included in the crc value.

kind regards,

Jos


这篇关于有人可以帮助我使用这个串行协议。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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