The invention discloses a
serial port communication method and application
system for rapidly controlling lamp beads, and the method comprises the steps: constructing a command data packet; the host sends a command data packet to the slave through a
serial port, and response
timeout timing is started; after receiving the command data packet, the slave sends a response data packet to the host through the
serial port; if the response
timeout timing is greater than the preset threshold value, the host resends the command data packet; if the response
timeout timing is not greater than the preset threshold value, judging whether the packet header of the response data packet is correct or not; if the packet header is correct, CRC is calculated and checked; if the
verification is passed, analyzing a command
acknowledgement code ACK, and judging an execution result of the slave according to the command
acknowledgement code ACK; if the indication is successful, sending the next command data packet; if so, re-sending the command data packet; if
verification fails, the host discards the response data packet; and if the packet header of the response data packet is wrong, the host discards the response data packet. According to the invention, the communication efficiency between the host and the slave is improved, and the
delay when the lamp beads are controlled is reduced.