Solution block diagram:

Schematic design description
Power supply section:

Display section:

Temperature detection section:

Alarm circuit:

51 minimum system:

PCB design description
There is nothing particularly noteworthy, except that P0 needs to be connected to an external pull-up resistor.

Software Description
Note: The software can use nested code blocks. It's not necessary to explain all parts of the software; only the important parts need to be explained. Code Block:
#include
void main()
{ unsigned char high, low; init_ds18b20(); // Initialize DS18B20 write_byte(0xcc); // Skip ROM operations write_byte(0x44); // Start temperature conversion delay(1000); // Wait for conversion to complete init_ds18b20(); // Initialize DS18B20 write_byte(0xcc); // Skip ROM operations write_byte(0xbe); // Read temperature register low = read_byte(); // Read low byte of temperature high = read_byte(); // Read high byte of temperature // Calculate temperature value printf("Temperature: %d.%d Celsius
", high, low); while(1);
printf(""/n);
}
void delay(unsigned int t) // Delay function { while(t--);}
void init_ds18b20() // Initialize DS18B20 { DQ = 1; // Pull the line high delay(8); // Delay 480us DQ = 0; // Send reset pulse delay(80); // Delay 4800us DQ = 1; // Release the bus delay(8); // Delay 480us }
unsigned char read_byte() // Read a byte { unsigned char i, dat = 0; for(i = 0; i { dat >>= 1; // Read data from high to low bits DQ = 0; // Send read command _nop_(); _nop_(); DQ = 1; // Release the bus _nop_(); _nop_(); if(DQ) // Read data dat |= 0x80; delay(8); // Delay } return dat;}
void write_byte(unsigned char dat) // Write a byte { unsigned char i; for(i = 0; i { DQ = 0; // Send write command DQ = dat & 0x01; _nop_(); _nop_(); DQ = 1; // Release bus dat >>= 1; // Next bit } delay(8); // Delay }
Physical demonstration
instructions: Physical pictures of the work, pictures can be captioned.

Demonstration video
instructions: Demonstration videos can be uploaded as attachments. The maximum file size for attachments is 50M. Files larger than 50M can be placed on other cloud storage or video websites. Just put the address link here.
Other attachment upload
instructions: Works participating in the event must upload the program attachments related to the project to the open source platform or personal code storage cloud. The maximum file size for attachment upload is 50M (please do not upload in the LCSC workspace, there are restrictions).