The main program of the main chip of the single-chip microcomputer realizes the temperature acquisition in general and circulates all the time.Through the interrupt application, the temperature difference changed by pressing the button can be recorded. Then set the timer and counter, and set the baud rate, start the serial communication, call the AD conversion subroutine, read in the user's input temperature value, and transmit the temperature value to the slave through the serial port.