我程序中的问题 [英] Problem in my program
本文介绍了我程序中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要以下程序的帮助.我用pascal肺写了它,当我用micro pascal将它编译成十六进制文件时,出现了错误,我需要一些帮助才能找到它.
谢谢
I need help with the program below. I wrote it with pascal lung and, when I compiled it with micro pascal to hex files, there is an error and I need some help to find it.
Thank you
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.
推荐答案
FC; trisc:=
FC; trisc:=
FF; trisa:=
FF; trisa:=
FF; ADCON1:=
FF; ADCON1:=
这篇关于我程序中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文