/**上電時讀出24C02資料,賦值給上下限,實現掉電保護**/
Read24c02(read_data,0x00,3);
set_TL=read_data[0];
set_TH=read_data[1];
set_she=read_data[2]/10.0;
/**顯示上下限溫度**/
EA=0;
if(flagh==0) play8(0,4,2,zheng);else play8(0,4,2,fu);
if(flagl==0) play8(1,4,2,zheng);else play8(1,4,2,fu);
H[0]=temp_TH/100;H[1]=temp_TH/10%10;H[2]=temp_TH%10;
L[0]=temp_TL/100;L[1]=temp_TL/10%10;L[2]=temp_TL%10;
play8(0,5,2,(shu0+16*H[0]));play8(0,6,2,(shu0+16*H[1]));play8(0,7,2,(shu0+16*H[2]));
play8(1,5,2,(shu0+16*L[0]));play8(1,6,2,(shu0+16*L[1]));play8(1,7,2,(shu0+16*L[2]));
EA=1;
/**上電時讀出24C02資料,賦值給上下限,實現掉電保護**/
Read24c02(read_data,0x00,3);
set_TL=read_data[0];
set_TH=read_data[1];
set_she=read_data[2]/10.0;
/**顯示上下限溫度**/
EA=0;
if(flagh==0) play8(0,4,2,zheng);else play8(0,4,2,fu);
if(flagl==0) play8(1,4,2,zheng);else play8(1,4,2,fu);
H[0]=temp_TH/100;H[1]=temp_TH/10%10;H[2]=temp_TH%10;
L[0]=temp_TL/100;L[1]=temp_TL/10%10;L[2]=temp_TL%10;
play8(0,5,2,(shu0+16*H[0]));play8(0,6,2,(shu0+16*H[1]));play8(0,7,2,(shu0+16*H[2]));
play8(1,5,2,(shu0+16*L[0]));play8(1,6,2,(shu0+16*L[1]));play8(1,7,2,(shu0+16*L[2]));
EA=1;