我的太阳能跟踪器程序中出现错误 [英] error in my program of solar tracker

查看:97
本文介绍了我的太阳能跟踪器程序中出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在微帕斯卡编译器中编译该程序时,请通过pic16f876确认有关太阳能跟踪器的程序
我看到此错误
程序程序;
Var l,i:longint;
标签L1;
开始
trisb:= $ FC;
trisc:= $ FF;
trisa:= $ FF;
ADCON1:= $ 8E;
portb:= 0;
而(true)做
开始
L1:
i:= 0;
portb:= 0; delay_ms(5000);
l:= adc_read(0); delay_ms(10);
而((l< 512)和(portc.0 = 0))做
开始
portb.0:= 1;
l:= adc_read(0); delay_ms(100);
i:= i + 1;
如果i = 50,则转到L1;
结束;
portb:= 0;
而((l> 512)和(portc.1 = 0))做
开始
portb.1:= 1;
l:= adc_read(0); delay_ms(100);
结束;
结束;
结束.
错误是
1 301%"不是有效的标识符%ùù.mpas
1304语法错误:预期为;"但是ù"找到了%ùù.mpas
0102完成(有错误):2011年7月7日,13:23:42%ùù.mpppi
4304语法错误:预期为."但是程序"找到了mmm.mpas
0102完成(有错误):2011年7月7日,13:23:47 mmm.mpppi
这是错误,请帮助我尽快找到在Proteus中进行仿真并实现的解决方案

OK this program about a solar tracker with pic16f876 when i compiled the program in micro pascal compiler
i see this errors
Program programme;
Var l,i:longint;
Label L1;
begin
trisb:=$FC;
trisc:=$FF;
trisa:=$FF;
ADCON1:=$8E;
portb:=0;
while (true) do
begin
L1:
i:=0;
portb:=0;delay_ms(5000);
l:=adc_read(0);delay_ms(10);
while ((l<512)and (portc.0=0)) do
begin
portb.0:=1;
l:=adc_read(0);delay_ms(100);
i:=i+1;
if i=50 then goto L1;
end;
portb:=0;
while ((l>512)and (portc.1=0)) do
begin
portb.1:=1;
l:=adc_read(0);delay_ms(100);
end;
end;
end.
the errors is
1 301 "%"is not valid identifier %ùù.mpas
1 304 Syntax error: Expected ";" but "ù" found %ùù.mpas
0 102 Finished (with errors): 07 ÌæÇä 2011, 13:23:42 %ùù.mpppi
4 304 Syntax error: Expected "." but "Program" found mmm.mpas
0 102 Finished (with errors): 07 ÌæÇä 2011, 13:23:47 mmm.mpppi
this is errors please Help me to find the solution i need it as soon as possible to simulate it in Proteus and realize it

推荐答案

FC;
trisc:=
FC;
trisc:=


FF;
trisa:=
FF;
trisa:=


FF;
ADCON1:=
FF;
ADCON1:=


这篇关于我的太阳能跟踪器程序中出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆