CN105045758B - 一种串行通信数据校验方法 - Google Patents

一种串行通信数据校验方法 Download PDF

Info

Publication number
CN105045758B
CN105045758B CN201510387579.6A CN201510387579A CN105045758B CN 105045758 B CN105045758 B CN 105045758B CN 201510387579 A CN201510387579 A CN 201510387579A CN 105045758 B CN105045758 B CN 105045758B
Authority
CN
China
Prior art keywords
data
groups
zero
result
sender
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510387579.6A
Other languages
English (en)
Other versions
CN105045758A (zh
Inventor
陆德康
林志良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NINGBO DONGHAI Group Corp.
Original Assignee
NINGBO DONGHAI INSTRUMENT WATERWAYS CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NINGBO DONGHAI INSTRUMENT WATERWAYS CO Ltd filed Critical NINGBO DONGHAI INSTRUMENT WATERWAYS CO Ltd
Priority to CN201510387579.6A priority Critical patent/CN105045758B/zh
Publication of CN105045758A publication Critical patent/CN105045758A/zh
Application granted granted Critical
Publication of CN105045758B publication Critical patent/CN105045758B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

本发明涉及一种串行通信数据校验方法,其特征在于:发送方按照预定的时间间隔,将同一组数据连续发送两次;而接收方在预定的时间间隔内收到发送方发来的两组数据后,将这两组数据按照字节顺序依次相减,如果相减结果为零,表示接收数据正确;如果相减结果不为零,表示接收数据错误。与现有技术相比,本发明的优点在于:通过将两组数据相减判断结果是否为零的方式进行校验,可靠性高、误判率低。

Description

一种串行通信数据校验方法
技术领域
本发明涉及一种串行通信数据校验方法。
背景技术
在串行通信时,接收方对接收到的串行通信数据正确率的校验方法通常采用“奇”“偶”校验方法,即,对一组接收到的串行通信数据中的“1”(高电平)的个数进行统计,然后通过是奇数个或偶数个进行校验。这种校验方法误判可能性较大,如“奇校验”时,如果一组数据因强电磁干扰产生奇数个干扰脉冲时,会产生误判;同样,“偶校验”时,一组数据因接收到偶数个干扰脉冲,也会产生误判。
发明内容
本发明所要解决的技术问题是针对上述现有技术提供一种可靠性高、误判率低的串行通信数据校验方法。
本发明解决上述技术问题所采用的技术方案为:一种串行通信数据校验方法,其特征在于:发送方按照预定的时间间隔,将同一组数据连续发送两次;而接收方在预定的时间间隔内收到发送方发来的两组数据后,将这两组数据按照字节顺序依次相减,如果相减结果为零,表示接收数据正确;如果相减结果不为零,表示接收数据错误。
作为改进,当两组数据的按照字节顺序依次相减后结果不为零时,再要求发送方重新发送一次数据,待接收方再次收到发送方发来的一组数据后,将新接收的一组数据与之前两组数据按照字节顺序依次相减,将相减结果为零的那两组数据认为正确数据;如果三组数据互不相同,则再要求发送方重新发送一次数据,直至找到两组内容相同的数据,然后认为这两组内容相同的数据为正确数据。
与现有技术相比,本发明的优点在于:通过将两组数据相减判断结果是否为零的方式进行校验,可靠性高、误判率低。
附图说明
图1为本发明实施例中串行通信数据校验方法流程图。
具体实施方式
以下结合附图实施例对本发明作进一步详细描述。
本实施例提供的串行通信数据校验方法,参见图1所示,发送方按照预定的时间间隔,将同一组数据连续发送两次;而接收方在预定的时间间隔内收到发送方发来的两组数据后,将这两组数据按照字节顺序依次相减,如果相减结果为零,表示接收数据正确;如果相减结果不为零,表示接收数据错误;当两组数据的按照字节顺序依次相减后结果不为零时,再要求发送方重新发送一次数据,待接收方再次收到发送方发来的一组数据后,将新接收的一组数据与之前两组数据按照字节顺序依次相减,将相减结果为零的那两组数据认为正确数据;如果三组数据互不相同,则再要求发送方重新发送一次数据,直至找到两组内容相同的数据,然后认为这两组内容相同的数据为正确数据。

Claims (1)

1.一种串行通信数据校验方法,其特征在于:发送方按照预定的时间间隔,将同一组数据连续发送两次;而接收方在预定的时间间隔内收到发送方发来的两组数据后,将这两组数据的按照字节顺序依次相减,如果相减结果为零,表示接收数据正确;如果相减结果不为零,表示接收数据错误;当两组数据按照字节顺序依次相减后结果不为零时,再要求发送方重新发送一次数据,待接收方再次收到发送方发来的一组数据后,将新接收的一组数据与之前两组数据按照字节顺序依次相减,将相减结果为零的那两组数据认为正确数据;如果三组数据互不相同,则再要求发送方重新发送一次数据,直至找到两组内容相同的数据,然后认为这两组内容相同的数据为正确数据。
CN201510387579.6A 2015-06-30 2015-06-30 一种串行通信数据校验方法 Active CN105045758B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510387579.6A CN105045758B (zh) 2015-06-30 2015-06-30 一种串行通信数据校验方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510387579.6A CN105045758B (zh) 2015-06-30 2015-06-30 一种串行通信数据校验方法

Publications (2)

Publication Number Publication Date
CN105045758A CN105045758A (zh) 2015-11-11
CN105045758B true CN105045758B (zh) 2018-10-12

Family

ID=54452316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510387579.6A Active CN105045758B (zh) 2015-06-30 2015-06-30 一种串行通信数据校验方法

Country Status (1)

Country Link
CN (1) CN105045758B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111619667B (zh) * 2020-06-03 2021-08-31 中国第一汽车股份有限公司 一种车辆控制方法、装置和车辆

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1551056A (zh) * 2003-03-20 2004-12-01 上海理工大学 旋转信号光电转换串行发送系统
CN103391165A (zh) * 2013-08-15 2013-11-13 成都博高科技有限责任公司 电力载波通信的数据发送方法、接收方法及相应装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3867494B2 (ja) * 2000-10-31 2007-01-10 横河電機株式会社 データ処理装置、およびデータ処理方法
CN101446937B (zh) * 2008-12-15 2010-09-01 苏州大学 Mon08接口批量数据传输方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1551056A (zh) * 2003-03-20 2004-12-01 上海理工大学 旋转信号光电转换串行发送系统
CN103391165A (zh) * 2013-08-15 2013-11-13 成都博高科技有限责任公司 电力载波通信的数据发送方法、接收方法及相应装置

Also Published As

Publication number Publication date
CN105045758A (zh) 2015-11-11

Similar Documents

Publication Publication Date Title
RU2626094C2 (ru) Способ и устройство для повышения надежности передачи при последовательной передаче данных с гибким размером сообщений
US10083149B2 (en) Method for serially transmitting a frame from a transmitter to at least one receiver and participants of a bus system via a bus system
MX2019009204A (es) Metodo de retransmision parcial.
WO2016171349A3 (ko) 당사자간 블록체인을 갖는 디지털 가상화폐의 거래시스템 및 방법
EP2976866B1 (en) Timestamp correction in a multi-lane communication link with skew
WO2020046499A3 (en) Embedded universal serial bus 2 repeater
CN105528325B (zh) 一种标准spi协议高速传输的保护方法及系统
CN104038316B (zh) 空间相机高可靠高时效异步串行通讯方法
MX2016006190A (es) Deteccion de simulacion.
US9678919B2 (en) Collision detection in EIA-485 bus systems
CN107148760B (zh) 将帧经由总线系统从发送器串行传输至至少一个接收器的方法和用于总线系统的参与站
EP3920472A4 (en) E-MAIL SYSTEM MERGED WITH CURRENCY PROTOCOLS, METHOD FOR SENDING MAIL, AND METHOD FOR RECEIVING MAIL
WO2017196079A3 (ko) 무선 통신 시스템에서 무선 신호 송수신 방법 및 장치
CN105183687A (zh) 一种分时串口通信方法及系统
CN105045758B (zh) 一种串行通信数据校验方法
EP3082282A1 (en) Method for time synchronization
WO2014144480A3 (en) Method and apparatus for translation of business messages
CN105005511A (zh) 一种串行通信数据校验方法
JP2016530782A5 (zh)
CN104253621B (zh) 数据接收器及数据接收方法
CN104539528B (zh) 多核通信设备及其与radius服务器间报文交互方法
US9710420B2 (en) System and method for improving the efficiency of a serial interface protocol
CN103793343B (zh) 一种串口传输数据的实现方法及系统
CN106354573A (zh) 一种基于优先级队列的进程间通信方法及装置
US9619310B2 (en) High speed data transmission methods and systems upon error detection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200825

Address after: 315181 Lin village, Haishu District, Ningbo, Zhejiang

Patentee after: NINGBO DONGHAI Group Corp.

Address before: 315181, Zhejiang, Ningbo province Yinzhou District Heng Lin Village

Patentee before: NINGBO DONGHAI INSTRUMENT WATERWAY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20151111

Assignee: Ningbo Donghai Intelligent Measurement Co.,Ltd.

Assignor: Ningbo Donghai Group Corp.

Contract record no.: X2023330000873

Denomination of invention: A Serial Communication Data Verification Method

Granted publication date: 20181012

License type: Exclusive License

Record date: 20231123