Single-chip multi-machine communication program wi
2016-08-23
0 0 0
no vote
Other
Earn points
Program general idea is:
First define several global variables after receiving the data, serial port interrupt subroutine with variable rec_data store one byte of data, then parses the data: first determines the packet's integrity, correctness, and extract the scripts, data and other data, stored for the main proceedings.
Protocol analysis in the process of using a global variable state_flag variable as a protocol parsing state flags, used to determine the current byte in one frame of the site, while in the process of receiving Automatic checkpointing and process the received data, check the packets are received at the same time. So when the tail-end of the frame when received, it means that the frame has been received, and passed the verification, the key data is also saved to the buffer (cmd and Data[]). Main procedures carried out by querying the retval flag of the analytical treatment of the agreement. If retval=1; Error fla
c
单片机
通信
串口
程序
pc
通讯
实现
Related Source Codes
PClite
0
0
no vote
generic embeded FTP Client
0
0
no vote
UDP Test Demo
0
0
no vote
TMS320F28335 DSP transmits data to EEPROM through
0
0
no vote
TMS320F28335 CAN communication source code
0
0
no vote
No comment