The general processing method in the main program of interrupt 4 is to transfer the data in the receiving register SBUF to the predefined buffer. Note that the cache needs to be shifted when accepting strings. The routine is as follows:
Invalid serial interrupt () interrupt 4
{
Uchar temperature;
rec _ data[i++]= SBUF; // rec_data is a predefined receiving buffer, which can be continuously received until you need serial data.
RI = 0; //The reception interrupt signal is cleared, indicating that reception will continue.
}