Real-Time Serial Communication Method Based on Long and Short Frames
This paper introduces a real-time serial communication method based on long and short frames.The communication protocol between the upper and lower computers is designed into two different frame structures:Short frame and long frame.The short frame is one byte,while the long frame is multiple bytes.The header and footer of long frames are encoded together with short frames.Short frame based communication is real-time,while long frame based communication is non real-time.By adopting this frame structure design method,the data throughput of serial communication is improved even when the real-time data volume is not large.This paper demonstrates the feasibility of this real-time communication method from frame structure design to software implementation and examples,and completes a nuclear detection instrument based on this method communication applications on γ energy spectrometers.
long and short framesγ energy spectrometerserial communication