这是我自己敲的,希望对你有用 部分代码: #include #defineAlarm10 sbitBeep=P3^4; sbitDQ=P2^4; unsignedchartempL=0,tempH=0; unsignedcharflag=0; unsignedinttemperature,negtemper; unsignedcharidataaddrdat[2]={0x0,0x0}; unsignedchartab[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x