void temptest(void)
{
signed char temp,tempmin,tempmax;
unsigned int t0rig;
unsigned
temptab[]={0x6262,0x61eb,0x6171,0x60f7,0x6047,0x5ff7,0x5f6e,0x5eef,0x5e53,0x5dbe,0x5d4b,0x5ca5,0x5c17,\
0x5b6b,0x5ada,0x5a5c,0x599b,0x58ff,0x5869,0x57b0,0x570d,0x5663,0x55c6,0x550e,0x5444,0x5396,\
0x52dd,0x5240,0x5198,0x50b0,0x5005,0x4f20,0x4e69,0x4db1,0x4cef,0x4c42,0x4b64,0x4aaa,0x49e1,\
0x48fc,0x4847,0x476c,0x46b1,0x4604,0x4503,0x4449,0x4356,0x4299,0x41c0,0x40ce,0x3ff0,0x3f2b,\
0x3e33,0x3d86,0x3ca6,0x3bd2,0x3b26,0x3a39,0x3973,0x38a6,0x37ef,0x373f,0x3687,0x35c3,0x3507,\
0x3487,0x33bc,0x32ed,0x324f,0x319e,0x3106,0x3053,0x2fa6,0x2f2a,0x2e88,0x2e00,0x2d63,0x2cd6,\
0x2c65,0x2bae,0x2b28,0x2a97,0x2a07,0x298e,0x2914,0x287a,0x280d,0x278a,0x2703,0x2687,0x2626,\
0x25e5,0x256d,0x24ee,0x2489,0x2414,0x23bc,0x2356,0x22d9,0x2278,0x2203};
px0count=2;
t0tst=1;
EX0=1;
testok=0;
while(! testok)
display();
t0rig=(unsigned int)TH0<<8|TL0;
tempmin=0;
tempmax=100;
while(1)
{
temp=(tempmax+tempmin)/2;
if(t0rig==temptab[temp])
break;
else if(t0rig>temptab[temp])
tempmax=temp;
else tempmin=temp;
if(tempmax-tempmin<=1)
{
if(temptab[tempmax]+temptab[tempmin]>2*t0rig)
temp=tempmax;
else temp=tempmin;
break;
}
}
ctemp=temp;
if(temp>65)
tempov=1;
else if(temp<45)
tempov=0;
}
...temptest': auto segment too large我该怎样修改
在C51编译的时候,如果出现了“error C241: 'main': auto segment too large” 的错误,主要原因是由于 51 "DATA" 存储容量不足。解决方法为:(1)把宣告"DATA"的变数改成 "XDATA"=>unsigned temptab[] 改成 unsigned xdata temptab[](2)快速的方法 : 在Keil C 的Target标签中,将...
...error C241: 'main': auto segment too large,怎么解决??_百度知...
在编译的时候,如果出现了“error C241: 'main': auto segment too large” 的错误,其原因是由于存储容量不足 解决方法为:在Keil C 的Target标签中,将Memory Model从small改为large, 这样编译的存储空间就从DATA变成了XDATA,也就解决了存储容量不足的问题。