编译器是PICC9.80
pic16f887
做的是一个LCD12864的菜单程序。
不带字库的那种。所以存了很多字库代码。而且后来程序也比较大
现在的问题是 1.硬件堆栈 10级
2.0. can't find 0x79A words (0x79a withtotal) for psect "stringtext" in segment "STRCODE" (largest unused contiguous range 0x74D)报这个错误。
分析了一下原因:
1.PIC的ROM分段 2K为一段。所以函数不能大于2K。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
{
u8 i,j;
if(0==PORT_KEY_FOOT) //检测脚踏 若有脚踏 退出放电 并且计数器加1
{
i++;
if(i==10)
{
i=0;
ifoot=~ifoot;
icounter++;
EEPROM_Write(7,icounter);
EEPROM_Write(6,icounter>>8);
EEPROM_Write(5,icounter>>8>>8);
EEPROM_Write(4,icounter>>8>>8>>8);
Send_Dispdata(Disp_Count);
}
}
else
{
j++;
if(j>=ifreq)
{
j=0;
PORT_3525=1; //关充电
delay_us(30); //150us
PORT_PPS=0; //开放电
delay_ms(3); //2.84ms
PORT_PPS=1; //关放电
delay_us(30); //150us
PORT_3525=0; //开充电
}
}
}
void Simmok_ad(void)
{
Ad();
Send_Dispdata(Disp_C);
if(Temper>=Max_temper) //温度一旦超过设定。 取消放电
ifoot=~ifoot;
while(Temper>=Max_temper) //温度超过设定值后 程序停在此处
{
Send_Dispdata(Disp_C);
Word(2,33,4,Zheng_Light,Language_select_6byte[Language]+72); //设置
Beep();
Ad();
}
}
void Simmok(void)
{
if(1==PORT_SIMOK) //未预燃
{
if(0==Sim(5)) //执行预燃并且查看到没有预燃成功
Sys_state=Work_Wait; //返回等待工作状态
}
else //预燃成功
{
Word(0,49,2,Fan_Light,Language_select_4byte[Language]+2*48); //反白触发
Word(6,49,2,Fan_Light,Language_select_4byte[Language]+3*48); //反白工作
Word(3,33,1,Zheng_Light,&Symboy1[5][0]); //OK
while(ifoot) //脚踏要求放电
{
Simmok_foot();
Simmok_ad();
}
}
}
后来我将下面的函数也分开。结果 还是跳转出错
void Work_wait1(void)
{
Drew_Frame_work();
Word(0,2,2,Zheng_Light,Language_select_4byte[Language]); //电压
Word(5,2,3,Zheng_Light,Language_select_6byte[Language]); //计数器
Word(0,18,2,Zheng_Light,Language_select_4byte[Language]+48); //频率
Word(0,49,2,Zheng_Light,Language_select_4byte[Language]+2*48); //触发
}
void Work_wait2(void)
{
Word(2,49,2,Zheng_Light,Language_select_4byte[Language]); //电压
Word(4,49,2,Zheng_Light,Language_select_4byte[Language]+48); //频率
Word(6,49,2,Zheng_Light,Language_select_4byte[Language]+4*48); //设置
Word(4,2,1,Zheng_Light,&Symboy[Disp_data][0]); //显示 1.能量 2.电压 3.级数 mj .v,l
Word(4,18,1,Zheng_Light,&Symboy[Disp_Hz][0]); //HZ
Word(1,33,1,Zheng_Light,&Symboy[Disp_C][0]); //C
}
void Work_wait3(void)
{
Send_Dispdata(Disp_data);
Send_Dispdata(Disp_Hz);
Send_Dispdata(Disp_C);
Send_Dispdata(Disp_Count);
Update_Frame_work();
}
//-------------------------------------------
void Work_wait(void)
{
Work_wait1();
Work_wait2();
Work_wait3();
Beep_Long();
}
"折磨死寡人了快"
your issue is that a) you are completely clueless about embedded programming and b) you refuse to read the compiler manual before you start coding.
-----------------------------------------------------------------------
诶 请到别处装逼
-----------------------------------------------------------------------
淡定,millwood0 是外国人,不会打中文,
一周热门 更多>