Absolute value encoder communication method and system based on spi

A technology of absolute value encoder and communication method, applied in transmission systems, digital transmission systems, synchronous information channels, etc., can solve problems such as fast time, inability to check data error costs, etc., to improve efficiency and reliability, and reduce hardware. Cost of use, ease of error detection, and effect of retransmission

Pending Publication Date: 2022-01-11
中国兵器装备集团自动化研究所有限公司
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The above protocols either have no error checking, or use a bit stream to transfer data
And the encoders using these protocols are basically realized by application-specific integrated circuits, or by CPLD or FPGA. However, if application-specific integrated circuits or CPLD or FPGA are used, the transmission time of the equipment is very fast, and the data cannot be error-checked and the cost is high. Higher, if the commonly used single-chip MCU is used, because it only has synchronous serial or asynchronous serial interface (SPI, USART), these interfaces generally only support data transmission of no more than 16 bits, it is difficult to accurately send or Therefore, it is necessary to design a new transmission control protocol that can realize communication between the microcontroller and the encoder

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Absolute value encoder communication method and system based on spi
  • Absolute value encoder communication method and system based on spi
  • Absolute value encoder communication method and system based on spi

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0035] Such as figure 1 , figure 2 As shown, the present embodiment is a spi-based absolute encoder communication method, and the specific process is:

[0036] S1. The encoder sequentially receives the clock signal sent by the SPI interface of the MCU host;

[0037] S2. The encoder starts to encode the data to be transmitted according to the rising edge or falling edge of each clock signal, and frames the encoded data in groups of eight bytes to obtain several data frames;

[0038] S3. The encoder sends each byte in each data frame to the MCU host sequentially, and each byte includes 8-bit data;

[0039] S4. Repeat S1-S3 until the data to be transmitted is sent.

[0040] Such as figure 2 As shown, when the encoder sends data frames in sequence, it needs to wait for the frame interval time Tm between adjacent data frames before continuing to send the next data frame. During the interval between two data frames, the encoder can The status of the data frame transmission is...

Embodiment 2

[0055] Such as image 3 As shown, Embodiment 2 provides an spi-based absolute encoder communication system, including an absolute encoder and an MCU host, and the absolute encoder includes an encoding module, a framing module, and a sending unit, wherein the The encoding module encodes the data to be transmitted from the rising edge or falling edge of each clock signal according to the clock signal received from the MCU host;

[0056] The framing module carries out framing according to the data encoded by the encoding module in groups of eight bytes to obtain several data frames;

[0057] The sending unit sequentially sends each byte in each data frame to the MCU host in turn, and needs to wait for the frame interval time between adjacent data frames before continuing to send the next data frame.

[0058] The absolute value encoder also includes a check unit, which calculates the transmission time required for the end of the data frame transmission by calculating the baud rat...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a spi-based absolute value encoder communication method and system. An encoder sequentially receives clock signals sent by an SPI interface of an MCU host; starting to encode the data to be transmitted according to the rising edge or the falling edge of each clock signal, and framing the encoded data in a manner that eight bytes form a group to collect a plurality of data frames; according to the method, each byte in each data frame is sequentially sent to an MCU host according to a sequence until to-be-transmitted data is sent completely, data sending and receiving are carried out by using 8-bit and 16-bit data formats of SPI interface standards of a common MCU, and the data are synchronously transmitted according to bytes instead of traditional bit-by-bit transmission. Therefore, data verification and accurate transmission can be realized under the condition that special hardware is not used, the data transmission rate and the data transmission reliability are improved, and the complexity and the use cost of a hardware system are reduced.

Description

technical field [0001] The invention relates to the field of absolute encoder communication, in particular to an SPI-based absolute encoder communication method and system. Background technique [0002] The current absolute encoder communication protocols include ssi, biss-c, EnDat, Tamagawa protocol, etc. Most of these communication protocols use the RS-422 or RS-485 standard as the physical layer, and use the synchronous serial transmission method to transmit one-way or two-way data. The frame is generally composed of bit streams, and time is used as the frame interval. At present, most encoders use synchronous transmission technology for high-speed communication, and rarely use asynchronous transmission technology. The main reason is that asynchronous transmission requires a high-precision clock system under various environmental conditions. The above protocols either have no error checking, or use a bit stream to transfer data. And the encoders using these protocols ar...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L1/00H04L7/00
CPCH04L7/0012H04L7/0066H04L1/0061
Inventor 刘必标许永衡张强陈至锦李勇陶俊瞳
Owner 中国兵器装备集团自动化研究所有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products