我加了LCD显示后发现整个程序大于16K了,编辑出错,但我的程序最多只有3K,为什么会超过16K的,我用的是18F4423,请大哥指教一下, 部分程序如下: #pragma code
unsigned char StepCount;
unsigned char receive_buff;
unsigned char ad_chanel;
unsigned short long a164; //0x98 0x99 0x9a
unsigned int AD_total; unsigned char rx_232_cnt; //@0xa0 char rx_232_buf; //0x102 unsigned short long a164_buf; signed long kb; int MixPrecent; int MaxPrecent; int Res; char Sign; unsigned char Time0_cnt;
char ResResult[6];
unsigned char Disp_Data_Buff[16]; unsigned char ResultSign[13]; unsigned char ReadBCD[18]; unsigned int AD_Up_DATA[4]; unsigned int AD_DOWN_DATA[4]; unsigned int AD_LEFT_DATA[4]; unsigned int AD_RIGHT_DATA[4];
unsigned char sin[6]= {97,98,99,100,101,35}; #pragma code /*-- 文字: 上 --*/ /*-- 宋体11; 此字体下对应的点阵为:宽x高=14x14 --*/ /*-- 高度不是8的倍数,现调整为:宽度x高度=14x16 --*/
unsigned rom far char up_array[28]={ 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x10,0x10,0x10,0x10,0x00,0x00,0x00, 0x10,0x10,0x10,0x10,0x10,0x10,0x1f,0x10,0x10,0x10,0x10,0x10,0x10,0x00 }; unsigned rom far char seun_array[28]={ 0xFf,0x01,0x11,0x2d,0xc3,0x00,0xff,0x49,0x49,0x49,0xc9,0x7f,0x00,0x00, 0x1f,0x02,0x04,0x02,0x01,0x00,0x1f,0x09,0x02,0x05,0x08,0x18,0x08,0x00 }; unsigned rom far char down_array[28]={ 0x01,0x01,0x01,0x01,0x01,0xff,0x01,0x11,0x21,0x41,0xc1,0x01,0x01,0x00, 0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
unsigned rom far char dot_array[12]={ 0x00,0x00,0x18,0x18,0x00,0x00, 0x00,0x00,0x03,0x03,0x00,0x00 };
unsigned rom far char Big_0_array[14]={ 0xE0,0x10,0x08,0x08,0x10,0xE0,0x00, 0x03,0x04,0x08,0x08,0x04,0x03,0x00
};
unsigned rom far char Big_1_array[14]={ 0x00,0x10,0x10,0xF8,0x00,0x00,0x00, 0x00,0x08,0x08,0x0F,0x08,0x08,0x00 }; unsigned rom far char Big_2_array[14]={ 0x00,0x30,0x08,0x08,0x88,0x70,0x00, 0x00,0x0C,0x0A,0x09,0x08,0x0C,0x00 }; unsigned rom far char Big_3_array[14]={ 0x00,0x30,0x08,0x48,0x48,0xB0,0x00, 0x00,0x06,0x08,0x08,0x08,0x07,0x00 }; unsigned rom far char Big_4_array[14]={ 0x00,0xC0,0x20,0x10,0xFC,0x00,0x00, 0x01,0x02,0x02,0x0A,0x0F,0x0A,0x00 }; unsigned rom far char Big_5_array[14]={ 0x00,0xF8,0x48,0x48,0x48,0x88,0x00, 0x00,0x06,0x08,0x08,0x08,0x07,0x00 }; unsigned rom far char Big_6_array[14]={ 0xE0,0x90,0x48,0x48,0x48,0x98,0x00, 0x07,0x08,0x08,0x08,0x08,0x07,0x00 }; unsigned rom far char Big_7_array[14]={ 0x00,0x38,0x08,0x88,0x68,0x18,0x00, 0x00,0x00,0x00,0x0F,0x00,0x00,0x00 }; unsigned rom far char Big_8_array[14]={ 0x30,0xC8,0x88,0x88,0xC8,0x30,0x00, 0x07,0x08,0x08,0x08,0x08,0x07,0x00 }; unsigned rom far char Big_9_array[14]={ 0xF0,0x08,0x08,0x08,0x88,0xF0,0x00, 0x0C,0x09,0x09,0x09,0x04,0x03,0x00 }; unsigned rom far char Big_dot_array[6]={ 0x00,0x00,0x00, 0x00,0x0C,0x0C }; unsigned rom far char Big_small_array[4]={ 0x00,0x60,0x60,0x00 }; unsigned rom far char Small_N1_array[8]={ 0x00,0x84,0xfe,0x80,0x00,0x00,0x00,0x7F}; unsigned rom far char Small_N2_array[8]={ 0x00,0xC4,0xA2,0x92,0x8C,0x00,0x00,0x7F}; unsigned rom far char Small_N3_array[8]={ 0x00,0x44,0x92,0x92,0x6c,0x00,0x00,0x7f}; unsigned rom far char Small_N4_array[8]={ 0x30,0x28,0x24,0xfe,0x20,0x00,0x00,0x7f}; unsigned rom far char Small_0_array[6]={ 0x00,0x7c,0x82,0x82,0x7c,0x00}; unsigned rom far char Small_1_array[6]={ 0x00,0x84,0xfe,0x80,0x0,0x00}; unsigned rom far char Small_2_array[6]={ 0x00,0xc4,0xa2,0x92,0x8c,0x00}; unsigned rom far char Small_3_array[6]={ 0x00,0x44,0x92,0x92,0x6c,0x00}; unsigned rom far char Small_4_array[6]={ 0x30,0x28,0x24,0xfe,0x20,0x00}; unsigned rom far char Small_5_array[6]={ 0x00,0x4e,0x8a,0x8a,0x72,0x00}; unsigned rom far char Small_6_array[6]={ 0x7c,0x92,0x92,0x92,0x60,0x00}; unsigned rom far char Small_7_array[6]={ 0x00,0x02,0xf2,0x0a,0x06,0x00}; unsigned rom far char Small_8_array[6]={ 0x00,0x6c,0x92,0x92,0x6c,0x00}; unsigned rom far char Small_9_array[6]={ 0x00,0x0c,0x92,0x92,0x7c,0x00};
#pragma code
void main(void){ Delay1KTCYx(200); //40ms Init(); GetBCD(); GetBCD(); GetBCD(); LCD_Init(); while(1){ StartSing();
if(F0.Bit.START)ad_action();
if(F0.Bit.Send_PC)SendRS232(); if(F1.Bit.Send_PLC)SendPLC();
// Disp_Result(); } }
。。。。。。。 。。。。。。。 下面一共有2000行的程序。。程序应该不可能会超过16K的,请高手指点。。。
 |
|